Versions in this module Expand all Collapse all v1 v1.2.2 Jul 31, 2015 v1.2.1 Jul 31, 2015 v1.2.0 Jul 30, 2015 Changes in this version + const BulkReply + const DefaultAddress + const DefaultMaxIdle + const DefaultNetwork + const DefaultTimeout + const ErrorReply + const IntegerReply + const MultiReply + const StatusReply + type DialConfig struct + Address string + Database int + MaxIdle int + Network string + Password string + Timeout time.Duration + type MonitorCommand struct + func (m *MonitorCommand) Close() error + func (m *MonitorCommand) Receive() (string, error) + type Pipelined struct + func (p *Pipelined) Close() + func (p *Pipelined) Command(args ...interface{}) error + func (p *Pipelined) Receive() (*Reply, error) + func (p *Pipelined) ReceiveAll() ([]*Reply, error) + type PubSub struct + Channels map[string]bool + Patterns map[string]bool + func (p *PubSub) Close() error + func (p *PubSub) PSubscribe(patterns ...string) error + func (p *PubSub) PUnSubscribe(patterns ...string) error + func (p *PubSub) Receive() ([]string, error) + func (p *PubSub) Subscribe(channels ...string) error + func (p *PubSub) UnSubscribe(channels ...string) error + type Redis struct + func Dial(cfg *DialConfig) (*Redis, error) + func DialURL(rawurl string) (*Redis, error) + func (r *Redis) Append(key, value string) (int64, error) + func (r *Redis) BLPop(keys []string, timeout int) ([]string, error) + func (r *Redis) BRPop(keys []string, timeout int) ([]string, error) + func (r *Redis) BRPopLPush(source, destination string, timeout int) ([]byte, error) + func (r *Redis) BgRewriteAof() error + func (r *Redis) BgSave() error + func (r *Redis) BitCount(key string, start, end int) (int64, error) + func (r *Redis) BitOp(operation, destkey string, keys ...string) (int64, error) + func (r *Redis) ClientGetName() ([]byte, error) + func (r *Redis) ClientKill(ip string, port int) error + func (r *Redis) ClientList() (string, error) + func (r *Redis) ClientPause(timeout uint64) error + func (r *Redis) ClientSetName(name string) error + func (r *Redis) ClosePool() + func (r *Redis) ConfigGet(parameter string) (map[string]string, error) + func (r *Redis) ConfigResetStat() error + func (r *Redis) ConfigRewrite() error + func (r *Redis) ConfigSet(parameter, value string) error + func (r *Redis) DBSize() (int64, error) + func (r *Redis) DebugObject(key string) (string, error) + func (r *Redis) Decr(key string) (int64, error) + func (r *Redis) DecrBy(key string, decrement int) (int64, error) + func (r *Redis) Del(keys ...string) (int64, error) + func (r *Redis) Dump(key string) ([]byte, error) + func (r *Redis) Echo(message string) (string, error) + func (r *Redis) Eval(script string, keys []string, args []string) (*Reply, error) + func (r *Redis) EvalSha(sha1 string, keys []string, args []string) (*Reply, error) + func (r *Redis) ExecuteCommand(args ...interface{}) (*Reply, error) + func (r *Redis) Exists(key string) (bool, error) + func (r *Redis) Expire(key string, seconds int) (bool, error) + func (r *Redis) ExpireAt(key string, timestamp int64) (bool, error) + func (r *Redis) FlushAll() error + func (r *Redis) FlushDB() error + func (r *Redis) Get(key string) ([]byte, error) + func (r *Redis) GetBit(key string, offset int) (int64, error) + func (r *Redis) GetRange(key string, start, end int) (string, error) + func (r *Redis) GetSet(key, value string) ([]byte, error) + func (r *Redis) HDel(key string, fields ...string) (int64, error) + func (r *Redis) HExists(key, field string) (bool, error) + func (r *Redis) HGet(key, field string) ([]byte, error) + func (r *Redis) HGetAll(key string) (map[string]string, error) + func (r *Redis) HIncrBy(key, field string, increment int) (int64, error) + func (r *Redis) HIncrByFloat(key, field string, increment float64) (float64, error) + func (r *Redis) HKeys(key string) ([]string, error) + func (r *Redis) HLen(key string) (int64, error) + func (r *Redis) HMGet(key string, fields ...string) ([][]byte, error) + func (r *Redis) HMSet(key string, pairs map[string]string) error + func (r *Redis) HScan(key string, cursor uint64, pattern string, count int) (uint64, map[string]string, error) + func (r *Redis) HSet(key, field, value string) (bool, error) + func (r *Redis) HSetnx(key, field, value string) (bool, error) + func (r *Redis) HVals(key string) ([]string, error) + func (r *Redis) Incr(key string) (int64, error) + func (r *Redis) IncrBy(key string, increment int) (int64, error) + func (r *Redis) IncrByFloat(key string, increment float64) (float64, error) + func (r *Redis) Info(section string) (string, error) + func (r *Redis) Keys(pattern string) ([]string, error) + func (r *Redis) LIndex(key string, index int) ([]byte, error) + func (r *Redis) LInsert(key, position, pivot, value string) (int64, error) + func (r *Redis) LLen(key string) (int64, error) + func (r *Redis) LPop(key string) ([]byte, error) + func (r *Redis) LPush(key string, values ...string) (int64, error) + func (r *Redis) LPushx(key, value string) (int64, error) + func (r *Redis) LRange(key string, start, end int) ([]string, error) + func (r *Redis) LRem(key string, count int, value string) (int64, error) + func (r *Redis) LSet(key string, index int, value string) error + func (r *Redis) LTrim(key string, start, stop int) error + func (r *Redis) LastSave() (int64, error) + func (r *Redis) MGet(keys ...string) ([][]byte, error) + func (r *Redis) MSet(pairs map[string]string) error + func (r *Redis) MSetnx(pairs map[string]string) (bool, error) + func (r *Redis) Monitor() (*MonitorCommand, error) + func (r *Redis) Move(key string, db int) (bool, error) + func (r *Redis) Object(subcommand string, arguments ...string) (*Reply, error) + func (r *Redis) PExpire(key string, milliseconds int) (bool, error) + func (r *Redis) PExpireAt(key string, timestamp int64) (bool, error) + func (r *Redis) PFAdd(key string, elements ...string) (int64, error) + func (r *Redis) PFCount(keys ...string) (int64, error) + func (r *Redis) PFMerge(destkey string, sourcekeys ...string) error + func (r *Redis) PSetex(key string, milliseconds int, value string) error + func (r *Redis) PTTL(key string) (int64, error) + func (r *Redis) Persist(key string) (bool, error) + func (r *Redis) Ping() error + func (r *Redis) Pipelining() (*Pipelined, error) + func (r *Redis) PubSub() (*PubSub, error) + func (r *Redis) Publish(channel, message string) (int64, error) + func (r *Redis) RPop(key string) ([]byte, error) + func (r *Redis) RPopLPush(source, destination string) ([]byte, error) + func (r *Redis) RPush(key string, values ...string) (int64, error) + func (r *Redis) RPushx(key, value string) (int64, error) + func (r *Redis) RandomKey() ([]byte, error) + func (r *Redis) Rename(key, newkey string) error + func (r *Redis) Renamenx(key, newkey string) (bool, error) + func (r *Redis) Restore(key string, ttl int, serialized string) error + func (r *Redis) SAdd(key string, members ...string) (int64, error) + func (r *Redis) SCard(key string) (int64, error) + func (r *Redis) SDiff(keys ...string) ([]string, error) + func (r *Redis) SDiffStore(destination string, keys ...string) (int64, error) + func (r *Redis) SInter(keys ...string) ([]string, error) + func (r *Redis) SInterStore(destination string, keys ...string) (int64, error) + func (r *Redis) SIsMember(key, member string) (bool, error) + func (r *Redis) SMembers(key string) ([]string, error) + func (r *Redis) SMove(source, destination, member string) (bool, error) + func (r *Redis) SPop(key string) ([]byte, error) + func (r *Redis) SRandMember(key string) ([]byte, error) + func (r *Redis) SRandMemberCount(key string, count int) ([]string, error) + func (r *Redis) SRem(key string, members ...string) (int64, error) + func (r *Redis) SScan(key string, cursor uint64, pattern string, count int) (uint64, []string, error) + func (r *Redis) SUnion(keys ...string) ([]string, error) + func (r *Redis) SUnionStore(destination string, keys ...string) (int64, error) + func (r *Redis) Save() error + func (r *Redis) Scan(cursor uint64, pattern string, count int) (uint64, []string, error) + func (r *Redis) ScriptExists(scripts ...string) ([]bool, error) + func (r *Redis) ScriptFlush() error + func (r *Redis) ScriptKill() error + func (r *Redis) ScriptLoad(script string) (string, error) + func (r *Redis) Set(key, value string, seconds, milliseconds int, mustExists, mustNotExists bool) error + func (r *Redis) SetBit(key string, offset, value int) (int64, error) + func (r *Redis) SetRange(key string, offset int, value string) (int64, error) + func (r *Redis) Setex(key string, seconds int, value string) error + func (r *Redis) Setnx(key, value string) (bool, error) + func (r *Redis) Shutdown(save, noSave bool) error + func (r *Redis) SimpleSet(key, value string) error + func (r *Redis) SlaveOf(host, port string) error + func (r *Redis) SlowLogGet(n int) ([]*SlowLog, error) + func (r *Redis) SlowLogLen() (int64, error) + func (r *Redis) SlowLogReset() error + func (r *Redis) Sort(key string) *SortCommand + func (r *Redis) StrLen(key string) (int64, error) + func (r *Redis) TTL(key string) (int64, error) + func (r *Redis) Time() ([]string, error) + func (r *Redis) Transaction() (*Transaction, error) + func (r *Redis) Type(key string) (string, error) + func (r *Redis) ZAdd(key string, pairs map[string]float64) (int64, error) + func (r *Redis) ZCard(key string) (int64, error) + func (r *Redis) ZCount(key, min, max string) (int64, error) + func (r *Redis) ZIncrBy(key string, increment float64, member string) (float64, error) + func (r *Redis) ZInterStore(destination string, keys []string, weights []int, aggregate string) (int64, error) + func (r *Redis) ZLexCount(key, min, max string) (int64, error) + func (r *Redis) ZRange(key string, start, stop int, withscores bool) ([]string, error) + func (r *Redis) ZRangeByLex(key, min, max string, limit bool, offset, count int) ([]string, error) + func (r *Redis) ZRangeByScore(key, min, max string, withscores, limit bool, offset, count int) ([]string, error) + func (r *Redis) ZRank(key, member string) (int64, error) + func (r *Redis) ZRem(key string, members ...string) (int64, error) + func (r *Redis) ZRemRangeByLex(key, min, max string) (int64, error) + func (r *Redis) ZRemRangeByRank(key string, start, stop int) (int64, error) + func (r *Redis) ZRemRangeByScore(key, min, max string) (int64, error) + func (r *Redis) ZRevRange(key string, start, stop int, withscores bool) ([]string, error) + func (r *Redis) ZRevRangeByScore(key, max, min string, withscores, limit bool, offset, count int) ([]string, error) + func (r *Redis) ZRevRank(key, member string) (int64, error) + func (r *Redis) ZScan(key string, cursor uint64, pattern string, count int) (uint64, []string, error) + func (r *Redis) ZScore(key, member string) ([]byte, error) + func (r *Redis) ZUnionStore(destination string, keys []string, weights []int, aggregate string) (int64, error) + type Reply struct + Bulk []byte + Error string + Integer int64 + Multi []*Reply + Status string + Type int + func (rp *Reply) BoolArrayValue() ([]bool, error) + func (rp *Reply) BoolValue() (bool, error) + func (rp *Reply) BytesArrayValue() ([][]byte, error) + func (rp *Reply) BytesValue() ([]byte, error) + func (rp *Reply) HashValue() (map[string]string, error) + func (rp *Reply) IntegerValue() (int64, error) + func (rp *Reply) ListValue() ([]string, error) + func (rp *Reply) MultiValue() ([]*Reply, error) + func (rp *Reply) OKValue() error + func (rp *Reply) StatusValue() (string, error) + func (rp *Reply) StringValue() (string, error) + type SlowLog struct + Command []string + ID int64 + Microseconds int64 + Timestamp int64 + type SortCommand struct + func (s *SortCommand) ASC() *SortCommand + func (s *SortCommand) Alpha(b bool) *SortCommand + func (s *SortCommand) By(pattern string) *SortCommand + func (s *SortCommand) DESC() *SortCommand + func (s *SortCommand) Get(patterns ...string) *SortCommand + func (s *SortCommand) Limit(offset, count int) *SortCommand + func (s *SortCommand) Run() (*Reply, error) + func (s *SortCommand) Store(destination string) *SortCommand + type Transaction struct + func (t *Transaction) Close() + func (t *Transaction) Command(args ...interface{}) error + func (t *Transaction) Discard() error + func (t *Transaction) Exec() ([]*Reply, error) + func (t *Transaction) UnWatch() error + func (t *Transaction) Watch(keys ...string) error