-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsts.go
42 lines (35 loc) · 819 Bytes
/
consts.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package datastruct
import (
"errors"
)
type KeyType string
const (
KeyTypeString KeyType = "string"
KeyTypeList KeyType = "list"
KeyTypeSet KeyType = "setIfNotExists"
KeyTypeSortedSet KeyType = "sortedSet"
KeyTypeHashTable KeyType = "hashTable"
)
var (
ErrNil = errors.New("redis: not found")
ErrKeyAndCommandNotMatch = errors.New("key type and command not match")
ErrNotInteger = errors.New("value is not an integer or out of range")
ErrNotFloat = errors.New("ERR value is not a valid float")
)
// zAdd flags
const (
ZAddInNone = 0
ZAddInIncr = 1 << (iota - 1)
ZAddInNx
ZAddInXx
)
const (
ZRangeInNone = 0
ZRangeInWithScores = 1 << (iota - 1)
ZRangeInByScore
ZRangeInByLex
)
const (
HSetInNone = 0
HSetInNx = 1 << (iota - 1)
)