2014-05-16 11:03:23 +04:00
|
|
|
package server
|
2014-05-02 13:08:20 +04:00
|
|
|
|
|
|
|
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-07-25 13:26:29 +04:00
|
|
|
ErrValue = errors.New("value is not an integer or out of range")
|
2014-07-27 21:58:55 +04:00
|
|
|
ErrSyntax = errors.New("syntax error")
|
2014-07-29 12:22:07 +04:00
|
|
|
ErrOffset = errors.New("offset bit is not an natural number")
|
|
|
|
ErrBool = errors.New("value is not 0 or 1")
|
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
|
|
|
|
2014-07-29 16:08:20 +04:00
|
|
|
PONG = "PONG"
|
|
|
|
OK = "OK"
|
2014-05-02 13:08:20 +04:00
|
|
|
)
|