Documentation
¶
Index ¶
- Constants
- Variables
- func Array(args ...string) string
- func Error(s string) string
- func Inline(s string) string
- func Int(n int) string
- func Ints(args ...int) string
- func Parse(b string) (interface{}, error)
- func Read(r *bufio.Reader) (string, error)
- func ReadArray(b string) ([]string, error)
- func ReadError(b string) (string, error)
- func ReadString(b string) (string, error)
- func ReadStrings(b string) ([]string, error)
- func String(s string) string
- func Strings(args ...string) string
- func Write(w io.Writer, cmd []string) error
- type Client
Constants ¶
View Source
const ( Nil = "$-1\r\n" NilList = "*-1\r\n" )
Variables ¶
View Source
var ( ErrProtocol = errors.New("invalid request") ErrUnexpected = errors.New("not what you asked for") )
Functions ¶
func Array ¶
Array assembles the args in a list. Args should be raw redis commands. Example: Array(String("foo"), String("bar"))
func Parse ¶
Parse into interfaces. `b` must contain exactly a single command (which can be nested).
func Read ¶
Read a single command, returning it raw. Used to read replies from redis. Understands RESP3 proto.
func ReadString ¶
func ReadStrings ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.