2014-05-02 13:08:20 +04:00
|
|
|
package ssdb
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
ErrEmptyCommand = errors.New("empty command")
|
|
|
|
ErrNotFound = errors.New("command not found")
|
2014-05-03 10:55:12 +04:00
|
|
|
ErrCmdParams = errors.New("invalid command param")
|
2014-05-02 13:08:20 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
Delims = []byte("\r\n")
|
|
|
|
|
|
|
|
NullBulk = []byte("-1")
|
|
|
|
NullArray = []byte("-1")
|
2014-05-03 10:55:12 +04:00
|
|
|
|
|
|
|
PONG = "PONG"
|
|
|
|
OK = "OK"
|
2014-05-02 13:08:20 +04:00
|
|
|
)
|
2014-05-04 15:02:55 +04:00
|
|
|
|
|
|
|
const (
|
|
|
|
KV_TYPE byte = iota + 1
|
|
|
|
HASH_TYPE
|
|
|
|
HSIZE_TYPE
|
|
|
|
LIST_TYPE
|
|
|
|
LSIZE_TYPE
|
2014-05-08 06:54:33 +04:00
|
|
|
ZSET_TYPE
|
|
|
|
ZSIZE_TYPE
|
|
|
|
ZSCORE_TYPE
|
2014-05-04 15:02:55 +04:00
|
|
|
)
|