proto

package
v5.2.7+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2017 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorReply  = '-'
	StatusReply = '+'
	IntReply    = ':'
	StringReply = '$'
	ArrayReply  = '*'
)

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) PeekBuffered

func (p *Reader) PeekBuffered() []byte

func (*Reader) ReadArrayLen

func (p *Reader) ReadArrayLen() (int64, error)

func (*Reader) ReadArrayReply

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

func (*Reader) ReadBytesReply

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

func (*Reader) ReadFloatReply

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

func (*Reader) ReadInt

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

func (*Reader) ReadIntReply

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

func (*Reader) ReadLine

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

func (*Reader) ReadN

func (p *Reader) ReadN(n int) ([]byte, error)

func (*Reader) ReadReply

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

func (*Reader) ReadScanReply

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

func (*Reader) ReadStringReply

func (p *Reader) ReadStringReply() (string, error)

func (*Reader) ReadTmpBytesReply

func (p *Reader) ReadTmpBytesReply() ([]byte, error)

func (*Reader) ReadUint

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

func (*Reader) Reset

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

type WriteBuffer

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

func NewWriteBuffer

func NewWriteBuffer() *WriteBuffer

func (*WriteBuffer) Append

func (w *WriteBuffer) Append(args []interface{}) error

func (*WriteBuffer) AppendBytes

func (w *WriteBuffer) AppendBytes(p []byte)

func (*WriteBuffer) AppendString

func (w *WriteBuffer) AppendString(s string)

func (*WriteBuffer) Bytes

func (w *WriteBuffer) Bytes() []byte

func (*WriteBuffer) Len

func (w *WriteBuffer) Len() int

func (*WriteBuffer) Reset

func (w *WriteBuffer) Reset()

Jump to

Keyboard shortcuts

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