Documentation ¶
Index ¶
- Variables
- func Encode(w *bufio.Writer, r Resp) error
- func EncodeToBytes(r Resp) ([]byte, error)
- func EncodeToString(r Resp) (string, error)
- func MustEncode(w *bufio.Writer, r Resp)
- func MustEncodeToBytes(r Resp) []byte
- func MustHandlerTable(o interface{}) map[string]HandlerFunc
- func NewHandlerTable(o interface{}) (map[string]HandlerFunc, error)
- func ParseArgs(resp Resp) (cmd string, args [][]byte, err error)
- type Array
- type BulkBytes
- type Error
- type HandlerFunc
- type HandlerTable
- type Int
- type Resp
- type RespType
- type Server
- type String
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func EncodeToBytes ¶
func EncodeToString ¶
func MustEncode ¶
func MustEncodeToBytes ¶
func MustHandlerTable ¶
func MustHandlerTable(o interface{}) map[string]HandlerFunc
func NewHandlerTable ¶
func NewHandlerTable(o interface{}) (map[string]HandlerFunc, error)
Types ¶
type Array ¶
type Array struct {
Value []Resp
}
func (*Array) AppendBulkBytes ¶
func (*Array) AppendError ¶
func (*Array) AppendString ¶
type BulkBytes ¶
type BulkBytes struct {
Value []byte
}
func NewBulkBytes ¶
func NewBulkBytesWithString ¶
type HandlerFunc ¶
type HandlerTable ¶
type HandlerTable map[string]HandlerFunc
type Resp ¶
type Resp interface {
Type() RespType
}
func DecodeFromBytes ¶
func MustDecode ¶
func MustDecodeFromBytes ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func MustServer ¶
func MustServer(o interface{}) *Server
func NewServerWithTable ¶
func NewServerWithTable(t HandlerTable) (*Server, error)
Click to show internal directories.
Click to hide internal directories.