Versions in this module Expand all Collapse all v0 v0.4.2 Feb 16, 2016 v0.4.1 Nov 10, 2015 v0.4.0 Aug 28, 2015 v0.3.2 Jun 22, 2015 Changes in this version + var Nil = errorf("redis: nil") + var TxFailedErr = errorf("redis: transaction failed") + type BitCount struct + End int64 + Start int64 + type BoolCmd struct + func NewBoolCmd(args ...string) *BoolCmd + func (cmd *BoolCmd) Result() (bool, error) + func (cmd *BoolCmd) String() string + func (cmd *BoolCmd) Val() bool + func (cmd BoolCmd) Err() error + type BoolSliceCmd struct + func NewBoolSliceCmd(args ...string) *BoolSliceCmd + func (cmd *BoolSliceCmd) Result() ([]bool, error) + func (cmd *BoolSliceCmd) String() string + func (cmd *BoolSliceCmd) Val() []bool + func (cmd BoolSliceCmd) Err() error + type Client struct + func NewClient(clOpt *Options) *Client + func NewFailoverClient(failoverOpt *FailoverOptions) *Client + func NewTCPClient(opt *Options) *Client + func NewUnixClient(opt *Options) *Client + func (c *Client) Append(key, value string) *IntCmd + func (c *Client) Auth(password string) *StatusCmd + func (c *Client) BLPop(timeout int64, keys ...string) *StringSliceCmd + func (c *Client) BRPop(timeout int64, keys ...string) *StringSliceCmd + func (c *Client) BRPopLPush(source, destination string, timeout int64) *StringCmd + func (c *Client) BgRewriteAOF() *StatusCmd + func (c *Client) BgSave() *StatusCmd + func (c *Client) BitCount(key string, bitCount *BitCount) *IntCmd + func (c *Client) BitOpAnd(destKey string, keys ...string) *IntCmd + func (c *Client) BitOpNot(destKey string, key string) *IntCmd + func (c *Client) BitOpOr(destKey string, keys ...string) *IntCmd + func (c *Client) BitOpXor(destKey string, keys ...string) *IntCmd + func (c *Client) ClientKill(ipPort string) *StatusCmd + func (c *Client) ClientList() *StringCmd + func (c *Client) ConfigGet(parameter string) *SliceCmd + func (c *Client) ConfigResetStat() *StatusCmd + func (c *Client) ConfigSet(parameter, value string) *StatusCmd + func (c *Client) DbSize() *IntCmd + func (c *Client) DebugObject(key string) *StringCmd + func (c *Client) Decr(key string) *IntCmd + func (c *Client) DecrBy(key string, decrement int64) *IntCmd + func (c *Client) Del(keys ...string) *IntCmd + func (c *Client) Dump(key string) *StringCmd + func (c *Client) Echo(message string) *StringCmd + func (c *Client) Eval(script string, keys []string, args []string) *Cmd + func (c *Client) EvalSha(sha1 string, keys []string, args []string) *Cmd + func (c *Client) Exists(key string) *BoolCmd + func (c *Client) Expire(key string, dur time.Duration) *BoolCmd + func (c *Client) ExpireAt(key string, tm time.Time) *BoolCmd + func (c *Client) FlushAll() *StatusCmd + func (c *Client) FlushDb() *StatusCmd + func (c *Client) Get(key string) *StringCmd + func (c *Client) GetBit(key string, offset int64) *IntCmd + func (c *Client) GetRange(key string, start, end int64) *StringCmd + func (c *Client) GetSet(key, value string) *StringCmd + func (c *Client) HDel(key string, fields ...string) *IntCmd + func (c *Client) HExists(key, field string) *BoolCmd + func (c *Client) HGet(key, field string) *StringCmd + func (c *Client) HGetAll(key string) *StringSliceCmd + func (c *Client) HGetAllMap(key string) *StringStringMapCmd + func (c *Client) HIncrBy(key, field string, incr int64) *IntCmd + func (c *Client) HIncrByFloat(key, field string, incr float64) *FloatCmd + func (c *Client) HKeys(key string) *StringSliceCmd + func (c *Client) HLen(key string) *IntCmd + func (c *Client) HMGet(key string, fields ...string) *SliceCmd + func (c *Client) HMSet(key, field, value string, pairs ...string) *StatusCmd + func (c *Client) HScan(key string, cursor int64, match string, count int64) *ScanCmd + func (c *Client) HSet(key, field, value string) *BoolCmd + func (c *Client) HSetNX(key, field, value string) *BoolCmd + func (c *Client) HVals(key string) *StringSliceCmd + func (c *Client) Incr(key string) *IntCmd + func (c *Client) IncrBy(key string, value int64) *IntCmd + func (c *Client) IncrByFloat(key string, value float64) *FloatCmd + func (c *Client) Info() *StringCmd + func (c *Client) Keys(pattern string) *StringSliceCmd + func (c *Client) LIndex(key string, index int64) *StringCmd + func (c *Client) LInsert(key, op, pivot, value string) *IntCmd + func (c *Client) LLen(key string) *IntCmd + func (c *Client) LPop(key string) *StringCmd + func (c *Client) LPush(key string, values ...string) *IntCmd + func (c *Client) LPushX(key, value string) *IntCmd + func (c *Client) LRange(key string, start, stop int64) *StringSliceCmd + func (c *Client) LRem(key string, count int64, value string) *IntCmd + func (c *Client) LSet(key string, index int64, value string) *StatusCmd + func (c *Client) LTrim(key string, start, stop int64) *StatusCmd + func (c *Client) LastSave() *IntCmd + func (c *Client) MGet(keys ...string) *SliceCmd + func (c *Client) MSet(pairs ...string) *StatusCmd + func (c *Client) MSetNX(pairs ...string) *BoolCmd + func (c *Client) Migrate(host, port, key string, db, timeout int64) *StatusCmd + func (c *Client) Move(key string, db int64) *BoolCmd + func (c *Client) Multi() *Multi + func (c *Client) ObjectEncoding(keys ...string) *StringCmd + func (c *Client) ObjectIdleTime(keys ...string) *DurationCmd + func (c *Client) ObjectRefCount(keys ...string) *IntCmd + func (c *Client) PExpire(key string, dur time.Duration) *BoolCmd + func (c *Client) PExpireAt(key string, tm time.Time) *BoolCmd + func (c *Client) PSetEx(key string, dur time.Duration, value string) *StatusCmd + func (c *Client) PTTL(key string) *DurationCmd + func (c *Client) Persist(key string) *BoolCmd + func (c *Client) Ping() *StatusCmd + func (c *Client) Pipeline() *Pipeline + func (c *Client) Pipelined(f func(*Pipeline) error) ([]Cmder, error) + func (c *Client) PubSub() *PubSub + func (c *Client) PubSubChannels(pattern string) *StringSliceCmd + func (c *Client) PubSubNumPat() *IntCmd + func (c *Client) PubSubNumSub(channels ...string) *SliceCmd + func (c *Client) Publish(channel, message string) *IntCmd + func (c *Client) Quit() *StatusCmd + func (c *Client) RPop(key string) *StringCmd + func (c *Client) RPopLPush(source, destination string) *StringCmd + func (c *Client) RPush(key string, values ...string) *IntCmd + func (c *Client) RPushX(key string, value string) *IntCmd + func (c *Client) RandomKey() *StringCmd + func (c *Client) Rename(key, newkey string) *StatusCmd + func (c *Client) RenameNX(key, newkey string) *BoolCmd + func (c *Client) Restore(key string, ttl int64, value string) *StatusCmd + func (c *Client) SAdd(key string, members ...string) *IntCmd + func (c *Client) SCard(key string) *IntCmd + func (c *Client) SDiff(keys ...string) *StringSliceCmd + func (c *Client) SDiffStore(destination string, keys ...string) *IntCmd + func (c *Client) SInter(keys ...string) *StringSliceCmd + func (c *Client) SInterStore(destination string, keys ...string) *IntCmd + func (c *Client) SIsMember(key, member string) *BoolCmd + func (c *Client) SMembers(key string) *StringSliceCmd + func (c *Client) SMove(source, destination, member string) *BoolCmd + func (c *Client) SPop(key string) *StringCmd + func (c *Client) SRandMember(key string) *StringCmd + func (c *Client) SRem(key string, members ...string) *IntCmd + func (c *Client) SScan(key string, cursor int64, match string, count int64) *ScanCmd + func (c *Client) SUnion(keys ...string) *StringSliceCmd + func (c *Client) SUnionStore(destination string, keys ...string) *IntCmd + func (c *Client) Save() *StatusCmd + func (c *Client) Scan(cursor int64, match string, count int64) *ScanCmd + func (c *Client) ScriptExists(scripts ...string) *BoolSliceCmd + func (c *Client) ScriptFlush() *StatusCmd + func (c *Client) ScriptKill() *StatusCmd + func (c *Client) ScriptLoad(script string) *StringCmd + func (c *Client) Select(index int64) *StatusCmd + func (c *Client) Set(key, value string) *StatusCmd + func (c *Client) SetBit(key string, offset int64, value int) *IntCmd + func (c *Client) SetEx(key string, dur time.Duration, value string) *StatusCmd + func (c *Client) SetNX(key, value string) *BoolCmd + func (c *Client) SetRange(key string, offset int64, value string) *IntCmd + func (c *Client) Shutdown() *StatusCmd + func (c *Client) ShutdownNoSave() *StatusCmd + func (c *Client) ShutdownSave() *StatusCmd + func (c *Client) SlaveOf(host, port string) *StatusCmd + func (c *Client) SlowLog() + func (c *Client) Sort(key string, sort Sort) *StringSliceCmd + func (c *Client) StrLen(key string) *IntCmd + func (c *Client) Sync() + func (c *Client) TTL(key string) *DurationCmd + func (c *Client) Time() *StringSliceCmd + func (c *Client) Type(key string) *StatusCmd + func (c *Client) ZAdd(key string, members ...Z) *IntCmd + func (c *Client) ZCard(key string) *IntCmd + func (c *Client) ZCount(key, min, max string) *IntCmd + func (c *Client) ZIncrBy(key string, increment float64, member string) *FloatCmd + func (c *Client) ZInterStore(destination string, store ZStore, keys ...string) *IntCmd + func (c *Client) ZRange(key string, start, stop int64) *StringSliceCmd + func (c *Client) ZRangeByScore(key string, opt ZRangeByScore) *StringSliceCmd + func (c *Client) ZRangeByScoreWithScores(key string, opt ZRangeByScore) *ZSliceCmd + func (c *Client) ZRangeWithScores(key string, start, stop int64) *ZSliceCmd + func (c *Client) ZRank(key, member string) *IntCmd + func (c *Client) ZRem(key string, members ...string) *IntCmd + func (c *Client) ZRemRangeByRank(key string, start, stop int64) *IntCmd + func (c *Client) ZRemRangeByScore(key, min, max string) *IntCmd + func (c *Client) ZRevRange(key, start, stop string) *StringSliceCmd + func (c *Client) ZRevRangeByScore(key string, opt ZRangeByScore) *StringSliceCmd + func (c *Client) ZRevRangeByScoreWithScores(key string, opt ZRangeByScore) *ZSliceCmd + func (c *Client) ZRevRangeWithScores(key, start, stop string) *ZSliceCmd + func (c *Client) ZRevRank(key, member string) *IntCmd + func (c *Client) ZScan(key string, cursor int64, match string, count int64) *ScanCmd + func (c *Client) ZScore(key, member string) *FloatCmd + func (c *Client) ZUnionStore(destination string, store ZStore, keys ...string) *IntCmd + func (c Client) Close() error + func (c Client) Process(cmd Cmder) + type Cmd struct + func NewCmd(args ...string) *Cmd + func (cmd *Cmd) Result() (interface{}, error) + func (cmd *Cmd) String() string + func (cmd *Cmd) Val() interface{} + func (cmd Cmd) Err() error + type Cmder interface + Err func() error + String func() string + type DurationCmd struct + func NewDurationCmd(precision time.Duration, args ...string) *DurationCmd + func (cmd *DurationCmd) Result() (time.Duration, error) + func (cmd *DurationCmd) String() string + func (cmd *DurationCmd) Val() time.Duration + func (cmd DurationCmd) Err() error + type FailoverOptions struct + DB int64 + DialTimeout time.Duration + IdleTimeout time.Duration + MasterName string + Password string + PoolSize int + ReadTimeout time.Duration + SentinelAddrs []string + WriteTimeout time.Duration + type FloatCmd struct + func NewFloatCmd(args ...string) *FloatCmd + func (cmd *FloatCmd) String() string + func (cmd *FloatCmd) Val() float64 + func (cmd FloatCmd) Err() error + type IntCmd struct + func NewIntCmd(args ...string) *IntCmd + func (cmd *IntCmd) Result() (int64, error) + func (cmd *IntCmd) String() string + func (cmd *IntCmd) Val() int64 + func (cmd IntCmd) Err() error + type Message struct + Channel string + Payload string + func (m *Message) String() string + type Multi struct + func (c *Multi) Close() error + func (c *Multi) Discard() error + func (c *Multi) Exec(f func() error) ([]Cmder, error) + func (c *Multi) Unwatch(keys ...string) *StatusCmd + func (c *Multi) Watch(keys ...string) *StatusCmd + func (c Multi) Process(cmd Cmder) + type Options struct + Addr string + DB int64 + DialTimeout time.Duration + Dialer func() (net.Conn, error) + IdleTimeout time.Duration + Network string + Password string + PoolSize int + ReadTimeout time.Duration + WriteTimeout time.Duration + type PMessage struct + Channel string + Pattern string + Payload string + func (m *PMessage) String() string + type Pipeline struct + func (c *Pipeline) Close() error + func (c *Pipeline) Discard() error + func (c *Pipeline) Exec() ([]Cmder, error) + func (c Pipeline) Process(cmd Cmder) + type PubSub struct + func (c *PubSub) PSubscribe(patterns ...string) error + func (c *PubSub) PUnsubscribe(patterns ...string) error + func (c *PubSub) Receive() (interface{}, error) + func (c *PubSub) ReceiveTimeout(timeout time.Duration) (interface{}, error) + func (c *PubSub) Subscribe(channels ...string) error + func (c *PubSub) Unsubscribe(channels ...string) error + func (c PubSub) Close() error + func (c PubSub) Process(cmd Cmder) + type ScanCmd struct + func NewScanCmd(args ...string) *ScanCmd + func (cmd *ScanCmd) Result() (int64, []string, error) + func (cmd *ScanCmd) String() string + func (cmd *ScanCmd) Val() (int64, []string) + func (cmd ScanCmd) Err() error + type Script struct + func NewScript(src string) *Script + func (s *Script) Eval(c scripter, keys []string, args []string) *Cmd + func (s *Script) EvalSha(c scripter, keys []string, args []string) *Cmd + func (s *Script) Exists(c scripter) *BoolSliceCmd + func (s *Script) Load(c scripter) *StringCmd + func (s *Script) Run(c *Client, keys []string, args []string) *Cmd + type SliceCmd struct + func NewSliceCmd(args ...string) *SliceCmd + func (cmd *SliceCmd) Result() ([]interface{}, error) + func (cmd *SliceCmd) String() string + func (cmd *SliceCmd) Val() []interface{} + func (cmd SliceCmd) Err() error + type Sort struct + By string + Count float64 + Get []string + IsAlpha bool + Offset float64 + Order string + Store string + type StatusCmd struct + func NewStatusCmd(args ...string) *StatusCmd + func (cmd *StatusCmd) Result() (string, error) + func (cmd *StatusCmd) String() string + func (cmd *StatusCmd) Val() string + func (cmd StatusCmd) Err() error + type StringCmd struct + func NewStringCmd(args ...string) *StringCmd + func (cmd *StringCmd) Float64() (float64, error) + func (cmd *StringCmd) Int64() (int64, error) + func (cmd *StringCmd) Result() (string, error) + func (cmd *StringCmd) String() string + func (cmd *StringCmd) Uint64() (uint64, error) + func (cmd *StringCmd) Val() string + func (cmd StringCmd) Err() error + type StringSliceCmd struct + func NewStringSliceCmd(args ...string) *StringSliceCmd + func (cmd *StringSliceCmd) Result() ([]string, error) + func (cmd *StringSliceCmd) String() string + func (cmd *StringSliceCmd) Val() []string + func (cmd StringSliceCmd) Err() error + type StringStringMapCmd struct + func NewStringStringMapCmd(args ...string) *StringStringMapCmd + func (cmd *StringStringMapCmd) Result() (map[string]string, error) + func (cmd *StringStringMapCmd) String() string + func (cmd *StringStringMapCmd) Val() map[string]string + func (cmd StringStringMapCmd) Err() error + type Subscription struct + Channel string + Count int + Kind string + func (m *Subscription) String() string + type Z struct + Member string + Score float64 + type ZRangeByScore struct + Count int64 + Max string + Min string + Offset int64 + type ZSliceCmd struct + func NewZSliceCmd(args ...string) *ZSliceCmd + func (cmd *ZSliceCmd) Result() ([]Z, error) + func (cmd *ZSliceCmd) String() string + func (cmd *ZSliceCmd) Val() []Z + func (cmd ZSliceCmd) Err() error + type ZStore struct + Aggregate string + Weights []int64