Documentation ¶
Index ¶
- Variables
- func IsEmptyMultiBulkReply(reply redis.Reply) bool
- func IsErrorReply(reply redis.Reply) bool
- func IsOKReply(reply redis.Reply) bool
- type ArgNumErrReply
- type BulkReply
- type EmptyMultiBulkReply
- type ErrorReply
- type IntReply
- type MultiBulkReply
- type MultiRawReply
- type NoReply
- type NullBulkReply
- type OkReply
- type PongReply
- type ProtocolErrReply
- type QueuedReply
- type StandardErrReply
- type StatusReply
- type SyntaxErrReply
- type UnknownErrReply
- type WrongTypeErrReply
Constants ¶
This section is empty.
Variables ¶
var CRLF = "\r\n"
CRLF is the line separator of redis serialization protocol
Functions ¶
func IsEmptyMultiBulkReply ¶
func IsErrorReply ¶
IsErrorReply returns true if the given protocol is error
Types ¶
type ArgNumErrReply ¶
type ArgNumErrReply struct {
Cmd string
}
ArgNumErrReply represents wrong number of arguments for command
func MakeArgNumErrReply ¶
func MakeArgNumErrReply(cmd string) *ArgNumErrReply
MakeArgNumErrReply represents wrong number of arguments for command
func (*ArgNumErrReply) Error ¶
func (r *ArgNumErrReply) Error() string
func (*ArgNumErrReply) ToBytes ¶
func (r *ArgNumErrReply) ToBytes() []byte
ToBytes marshals redis.Reply
type EmptyMultiBulkReply ¶
type EmptyMultiBulkReply struct{}
EmptyMultiBulkReply is a empty list
func MakeEmptyMultiBulkReply ¶
func MakeEmptyMultiBulkReply() *EmptyMultiBulkReply
MakeEmptyMultiBulkReply creates EmptyMultiBulkReply
func (*EmptyMultiBulkReply) ToBytes ¶
func (r *EmptyMultiBulkReply) ToBytes() []byte
ToBytes marshal redis.Reply
type ErrorReply ¶
ErrorReply is an error and redis.Reply
type MultiBulkReply ¶
type MultiBulkReply struct {
Args [][]byte
}
MultiBulkReply stores a list of string
func MakeMultiBulkReply ¶
func MakeMultiBulkReply(args [][]byte) *MultiBulkReply
MakeMultiBulkReply creates MultiBulkReply
func (*MultiBulkReply) ToBytes ¶
func (r *MultiBulkReply) ToBytes() []byte
ToBytes marshal redis.Reply
type MultiRawReply ¶
MultiRawReply store complex list structure, for example GeoPos command
func MakeMultiRawReply ¶
func MakeMultiRawReply(replies []redis.Reply) *MultiRawReply
MakeMultiRawReply creates MultiRawReply
func (*MultiRawReply) ToBytes ¶
func (r *MultiRawReply) ToBytes() []byte
ToBytes marshal redis.Reply
type NullBulkReply ¶
type NullBulkReply struct{}
NullBulkReply is empty string
func MakeNullBulkReply ¶
func MakeNullBulkReply() *NullBulkReply
MakeNullBulkReply creates a new NullBulkReply
func (*NullBulkReply) ToBytes ¶
func (r *NullBulkReply) ToBytes() []byte
ToBytes marshal redis.Reply
type ProtocolErrReply ¶
type ProtocolErrReply struct {
Msg string
}
ProtocolErrReply represents meeting unexpected byte during parse requests
func (*ProtocolErrReply) Error ¶
func (r *ProtocolErrReply) Error() string
func (*ProtocolErrReply) ToBytes ¶
func (r *ProtocolErrReply) ToBytes() []byte
ToBytes marshals redis.Reply
type QueuedReply ¶
type QueuedReply struct{}
QueuedReply is +QUEUED
func MakeQueuedReply ¶
func MakeQueuedReply() *QueuedReply
MakeQueuedReply returns a QUEUED protocol
type StandardErrReply ¶
type StandardErrReply struct {
Status string
}
StandardErrReply represents server error
func MakeErrReply ¶
func MakeErrReply(status string) *StandardErrReply
MakeErrReply creates StandardErrReply
func (*StandardErrReply) Error ¶
func (r *StandardErrReply) Error() string
func (*StandardErrReply) ToBytes ¶
func (r *StandardErrReply) ToBytes() []byte
ToBytes marshal redis.Reply
type StatusReply ¶
type StatusReply struct {
Status string
}
StatusReply stores a simple status string
func MakeStatusReply ¶
func MakeStatusReply(status string) *StatusReply
MakeStatusReply creates StatusReply
type SyntaxErrReply ¶
type SyntaxErrReply struct{}
SyntaxErrReply represents meeting unexpected arguments
func MakeSyntaxErrReply ¶
func MakeSyntaxErrReply() *SyntaxErrReply
MakeSyntaxErrReply creates syntax error
func (*SyntaxErrReply) Error ¶
func (r *SyntaxErrReply) Error() string
func (*SyntaxErrReply) ToBytes ¶
func (r *SyntaxErrReply) ToBytes() []byte
ToBytes marshals redis.Reply
type UnknownErrReply ¶
type UnknownErrReply struct{}
UnknownErrReply represents UnknownErr
func (*UnknownErrReply) Error ¶
func (r *UnknownErrReply) Error() string
func (*UnknownErrReply) ToBytes ¶
func (r *UnknownErrReply) ToBytes() []byte
ToBytes marshals redis.Reply
type WrongTypeErrReply ¶
type WrongTypeErrReply struct{}
WrongTypeErrReply represents operation against a key holding the wrong kind of value
func (*WrongTypeErrReply) Error ¶
func (r *WrongTypeErrReply) Error() string
func (*WrongTypeErrReply) ToBytes ¶
func (r *WrongTypeErrReply) ToBytes() []byte
ToBytes marshals redis.Reply