proto

package
v8.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorReply  = '-'
	StatusReply = '+'
	IntReply    = ':'
	StringReply = '$'
	ArrayReply  = '*'
)
View Source
const Nil = RedisError("redis: nil")

Variables

This section is empty.

Functions

func ParseErrorReply

func ParseErrorReply(line []byte) error

func Scan

func Scan(b []byte, v interface{}) error

func ScanSlice

func ScanSlice(data []string, slice interface{}) error

Types

type MultiBulkParse

type MultiBulkParse func(*Reader, int64) (interface{}, error)

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(rd io.Reader) *Reader

func (*Reader) Buffered

func (r *Reader) Buffered() int

func (*Reader) Peek

func (r *Reader) Peek(n int) ([]byte, error)

func (*Reader) ReadArrayLen

func (r *Reader) ReadArrayLen() (int, error)

func (*Reader) ReadArrayReply

func (r *Reader) ReadArrayReply(m MultiBulkParse) (interface{}, error)

func (*Reader) ReadFloatReply

func (r *Reader) ReadFloatReply() (float64, error)

func (*Reader) ReadInt

func (r *Reader) ReadInt() (int64, error)

func (*Reader) ReadIntReply

func (r *Reader) ReadIntReply() (int64, error)

func (*Reader) ReadLine

func (r *Reader) ReadLine() ([]byte, error)

func (*Reader) ReadReply

func (r *Reader) ReadReply(m MultiBulkParse) (interface{}, error)

func (*Reader) ReadScanReply

func (r *Reader) ReadScanReply() ([]string, uint64, error)

func (*Reader) ReadString

func (r *Reader) ReadString() (string, error)

func (*Reader) ReadUint

func (r *Reader) ReadUint() (uint64, error)

func (*Reader) Reset

func (r *Reader) Reset(rd io.Reader)

type RedisError

type RedisError string

func (RedisError) Error

func (e RedisError) Error() string

func (RedisError) RedisError

func (RedisError) RedisError()

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(wr writer) *Writer

func (*Writer) WriteArg

func (w *Writer) WriteArg(v interface{}) error

func (*Writer) WriteArgs

func (w *Writer) WriteArgs(args []interface{}) error

Jump to

Keyboard shortcuts

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