reply

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CRLF = "\r\n"
)
View Source
var NoBytes = []byte("")
View Source
var PongBytes = []byte("+PONG\r\n")

Functions

func IsErrorReply

func IsErrorReply(reply redis.Reply) bool

Types

type ArgNumErrReply

type ArgNumErrReply struct {
	Cmd string
}

ArgNumErr

func (*ArgNumErrReply) Error

func (r *ArgNumErrReply) Error() string

func (*ArgNumErrReply) ToBytes

func (r *ArgNumErrReply) ToBytes() []byte

type BulkReply

type BulkReply struct {
	Arg []byte
}

func MakeBulkReply

func MakeBulkReply(arg []byte) *BulkReply

func (*BulkReply) ToBytes

func (r *BulkReply) ToBytes() []byte

type EmptyMultiBulkReply

type EmptyMultiBulkReply struct{}

func MakeEmptyMultiBulkReply

func MakeEmptyMultiBulkReply() *EmptyMultiBulkReply

func (*EmptyMultiBulkReply) ToBytes

func (r *EmptyMultiBulkReply) ToBytes() []byte

type ErrorReply

type ErrorReply interface {
	Error() string
	ToBytes() []byte
}

type IntReply

type IntReply struct {
	Code int64
}

func MakeIntReply

func MakeIntReply(code int64) *IntReply

func (*IntReply) ToBytes

func (r *IntReply) ToBytes() []byte

type MultiBulkReply

type MultiBulkReply struct {
	Args [][]byte
}

func MakeMultiBulkReply

func MakeMultiBulkReply(args [][]byte) *MultiBulkReply

func (*MultiBulkReply) ToBytes

func (r *MultiBulkReply) ToBytes() []byte

type MultiRawReply

type MultiRawReply struct {
	Args [][]byte
}

func MakeMultiRawReply

func MakeMultiRawReply(args [][]byte) *MultiRawReply

func (*MultiRawReply) ToBytes

func (r *MultiRawReply) ToBytes() []byte

type NoReply

type NoReply struct{}

reply nothing, for commands like subscribe

func (*NoReply) ToBytes

func (r *NoReply) ToBytes() []byte

type NullBulkReply

type NullBulkReply struct{}

func MakeNullBulkReply

func MakeNullBulkReply() *NullBulkReply

func (*NullBulkReply) ToBytes

func (r *NullBulkReply) ToBytes() []byte

type OkReply

type OkReply struct{}

func (*OkReply) ToBytes

func (r *OkReply) ToBytes() []byte

type PongReply

type PongReply struct{}

func (*PongReply) ToBytes

func (r *PongReply) ToBytes() []byte

type ProtocolErrReply

type ProtocolErrReply struct {
	Msg string
}

func (*ProtocolErrReply) Error

func (r *ProtocolErrReply) Error() string

func (*ProtocolErrReply) ToBytes

func (r *ProtocolErrReply) ToBytes() []byte

type StandardErrReply

type StandardErrReply struct {
	Status string
}

func MakeErrReply

func MakeErrReply(status string) *StandardErrReply

func (*StandardErrReply) Error

func (r *StandardErrReply) Error() string

func (*StandardErrReply) ToBytes

func (r *StandardErrReply) ToBytes() []byte

type StatusReply

type StatusReply struct {
	Status string
}

func MakeStatusReply

func MakeStatusReply(status string) *StatusReply

func (*StatusReply) ToBytes

func (r *StatusReply) ToBytes() []byte

type SyntaxErrReply

type SyntaxErrReply struct{}

SyntaxErr

func (*SyntaxErrReply) Error

func (r *SyntaxErrReply) Error() string

func (*SyntaxErrReply) ToBytes

func (r *SyntaxErrReply) ToBytes() []byte

type UnknownErrReply

type UnknownErrReply struct{}

UnknownErr

func (*UnknownErrReply) Error

func (r *UnknownErrReply) Error() string

func (*UnknownErrReply) ToBytes

func (r *UnknownErrReply) ToBytes() []byte

type WrongTypeErrReply

type WrongTypeErrReply struct{}

WrongTypeErr

func (*WrongTypeErrReply) Error

func (r *WrongTypeErrReply) Error() string

func (*WrongTypeErrReply) ToBytes

func (r *WrongTypeErrReply) ToBytes() []byte

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL