Versions in this module Expand all Collapse all v0 v0.3.1 Jun 21, 2021 Changes in this version + const ClusterMode + const StubMode + type Config struct + Addr string + Addrs []string + DB int + Debug bool + DialTimeout time.Duration + EnableTrace bool + IdleTimeout time.Duration + MaxRetries int + MinIdleConns int + Mode string + OnDialError string + Password string + PoolSize int + ReadOnly bool + ReadTimeout time.Duration + SlowThreshold time.Duration + WriteTimeout time.Duration + func DefaultRedisConfig() Config + func RawRedisClusterConfig(key string) Config + func RawRedisConfig(key string) Config + func RawRedisStubConfig(key string) Config + func StdRedisClusterConfig(name string) Config + func StdRedisConfig(name string) Config + func StdRedisStubConfig(name string) Config + func (config Config) Build() *Redis + type Redis struct + Client redis.Cmdable + Config *Config + func (r *Redis) Close() (err error) + func (r *Redis) Cluster() *redis.ClusterClient + func (r *Redis) Decr(key string) bool + func (r *Redis) Del(key string) int64 + func (r *Redis) DelWithErr(key string) (int64, error) + func (r *Redis) Exists(key string) bool + func (r *Redis) ExistsWithErr(key string) (bool, error) + func (r *Redis) Expire(key string, expiration time.Duration) (bool, error) + func (r *Redis) GeoAdd(key string, location *redis.GeoLocation) (int64, error) + func (r *Redis) GeoRadius(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) ([]redis.GeoLocation, error) + func (r *Redis) Get(key string) string + func (r *Redis) GetRaw(key string) ([]byte, error) + func (r *Redis) HDel(key string, field ...string) bool + func (r *Redis) HGet(key string, fields string) (string, error) + func (r *Redis) HGetAll(key string) map[string]string + func (r *Redis) HIncrBy(key string, field string, incr int) int64 + func (r *Redis) HIncrByWithErr(key string, field string, incr int) (int64, error) + func (r *Redis) HKeys(key string) []string + func (r *Redis) HLen(key string) int64 + func (r *Redis) HMGet(key string, fileds []string) []string + func (r *Redis) HMGetMap(key string, fields []string) map[string]string + func (r *Redis) HMSet(key string, hash map[string]interface{}, expire time.Duration) bool + func (r *Redis) HSet(key string, field string, value interface{}) bool + func (r *Redis) Incr(key string) bool + func (r *Redis) IncrBy(key string, increment int64) (int64, error) + func (r *Redis) IncrWithErr(key string) (int64, error) + func (r *Redis) LIndex(key string, idx int64) (string, error) + func (r *Redis) LLen(key string) int64 + func (r *Redis) LLenWithErr(key string) (int64, error) + func (r *Redis) LPush(key string, values ...interface{}) (int64, error) + func (r *Redis) LRange(key string, start, stop int64) ([]string, error) + func (r *Redis) LRem(key string, count int64, value interface{}) int64 + func (r *Redis) LTrim(key string, start, stop int64) (string, error) + func (r *Redis) MGet(keys ...string) ([]string, error) + func (r *Redis) MGets(keys []string) ([]interface{}, error) + func (r *Redis) RPop(key string) (string, error) + func (r *Redis) RPush(key string, values ...interface{}) (int64, error) + func (r *Redis) SAdd(key string, member ...interface{}) (int64, error) + func (r *Redis) SIsMember(key string, member interface{}) (bool, error) + func (r *Redis) SMembers(key string) ([]string, error) + func (r *Redis) Scan(cursor uint64, match string, count int64) ([]string, error) + func (r *Redis) Set(key string, value interface{}, expire time.Duration) bool + func (r *Redis) SetNx(key string, value interface{}, expiration time.Duration) bool + func (r *Redis) SetNxWithErr(key string, value interface{}, expiration time.Duration) (bool, error) + func (r *Redis) SetWithErr(key string, value interface{}, expire time.Duration) error + func (r *Redis) Stub() *redis.Client + func (r *Redis) TTL(key string) (int64, error) + func (r *Redis) Type(key string) (string, error) + func (r *Redis) ZAdd(key string, members ...redis.Z) (int64, error) + func (r *Redis) ZCard(key string) (int64, error) + func (r *Redis) ZCount(key string, min, max string) (int64, error) + func (r *Redis) ZRange(key string, start, stop int64) ([]string, error) + func (r *Redis) ZRem(key string, members ...interface{}) (int64, error) + func (r *Redis) ZRemRangeByRank(key string, start, stop int64) (int64, error) + func (r *Redis) ZRevRange(key string, start, stop int64) ([]string, error) + func (r *Redis) ZRevRangeByScore(key string, opt redis.ZRangeBy) ([]string, error) + func (r *Redis) ZRevRangeByScoreWithScores(key string, opt redis.ZRangeBy) ([]redis.Z, error) + func (r *Redis) ZRevRangeWithScores(key string, start, stop int64) ([]redis.Z, error) + func (r *Redis) ZRevRank(key string, member string) (int64, error) + func (r *Redis) ZScore(key string, member string) (float64, error)