Documentation ¶
Index ¶
- func DefaultBuild() module.Invoker
- type CallerCfg
- type Client
- func (r *Client) Blpop(channel string, time interface{}) (interface{}, error)
- func (r *Client) Decr(key string) (val int64, err error)
- func (r *Client) DecrBy(key string, amount int) (val int64, err error)
- func (r *Client) Del(key string) error
- func (r *Client) Do(commandName string, args ...interface{}) (reply interface{}, err error)
- func (r *Client) Exists(key string) (bool, error)
- func (r *Client) Expire(key string, expire int) error
- func (r *Client) Flush() error
- func (r *Client) Get(key string) (interface{}, error)
- func (r *Client) GetBool(key string) (bool, error)
- func (r *Client) GetInt(key string) (int, error)
- func (r *Client) GetInt64(key string) (int64, error)
- func (r *Client) GetObject(key string, val interface{}) error
- func (r *Client) GetString(key string) (string, error)
- func (r *Client) Hget(key, field string) (reply interface{}, err error)
- func (r *Client) HgetAll(key string, val interface{}) error
- func (r *Client) HgetBool(key, field string) (reply bool, err error)
- func (r *Client) HgetInt(key, field string) (reply int, err error)
- func (r *Client) HgetInt64(key, field string) (reply int64, err error)
- func (r *Client) HgetObject(key, field string, val interface{}) error
- func (r *Client) HgetString(key, field string) (reply string, err error)
- func (r *Client) Hmset(key string, val interface{}, expire int) (err error)
- func (r *Client) Hset(key, field string, val interface{}) (interface{}, error)
- func (r *Client) Incr(key string) (val int64, err error)
- func (r *Client) IncrBy(key string, amount int) (val int64, err error)
- func (r *Client) Publish(channel, message string) (int, error)
- func (r *Client) Rpush(channel, msg string) (interface{}, error)
- func (r *Client) Send(commandName string, args ...interface{}) error
- func (r *Client) Set(key string, val interface{}, expire int) (interface{}, error)
- func (r *Client) Ttl(key string) (ttl int64, err error)
- func (r *Client) Zadd(key string, score int64, member string) (reply interface{}, err error)
- func (r *Client) Zrange(key string, from, to int64) (map[string]int64, error)
- func (r *Client) ZrangeByScore(key string, from, to, offset int64, count int) (map[string]int64, error)
- func (r *Client) Zrank(key, member string) (int64, error)
- func (r *Client) Zrem(key string, member string) (reply interface{}, err error)
- func (r *Client) Zrevrange(key string, from, to int64) (map[string]int64, error)
- func (r *Client) ZrevrangeByScore(key string, from, to, offset int64, count int) (map[string]int64, error)
- func (r *Client) Zrevrank(key, member string) (int64, error)
- func (r *Client) Zscore(key string, member string) (int64, error)
- type RedisImp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultBuild ¶
Types ¶
type CallerCfg ¶
type CallerCfg struct { Debug bool Network string `ini:"network"` // tcp Addr string `ini:"addr"` // 127.0.0.1:6379 DB int `ini:"db"` Password string `ini:"password"` ConnectTimeout module.Duration `ini:"connectTimeout"` ReadTimeout module.Duration `ini:"readTimeout"` WriteTimeout module.Duration `ini:"writeTimeout"` MaxIdle int `ini:"maxIdle"` MaxActive int `ini:"maxActive"` IdleTimeout module.Duration `ini:"idleTimeout"` Wait bool `ini:"wait"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) HgetObject ¶
func (*Client) HgetString ¶
func (*Client) Zrange ¶
Zrange 返回有序集中,指定区间内的成员。其中成员的位置按分数值递增(从小到大)来排序。具有相同分数值的成员按字典序(lexicographical order )来排列。 以 0 表示有序集第一个成员,以 1 表示有序集第二个成员,以此类推。或 以 -1 表示最后一个成员, -2 表示倒数第二个成员,以此类推。
func (*Client) ZrangeByScore ¶
func (r *Client) ZrangeByScore(key string, from, to, offset int64, count int) (map[string]int64, error)
ZrangeByScore 返回有序集合中指定分数区间的成员列表。有序集成员按分数值递增(从小到大)次序排列。 具有相同分数值的成员按字典序来排列
func (*Client) Zrevrange ¶
Zrevrange 返回有序集中,指定区间内的成员。其中成员的位置按分数值递减(从大到小)来排列。具有相同分数值的成员按字典序(lexicographical order )来排列。 以 0 表示有序集第一个成员,以 1 表示有序集第二个成员,以此类推。或 以 -1 表示最后一个成员, -2 表示倒数第二个成员,以此类推。
func (*Client) ZrevrangeByScore ¶
func (r *Client) ZrevrangeByScore(key string, from, to, offset int64, count int) (map[string]int64, error)
ZrevrangeByScore 返回有序集中指定分数区间内的所有的成员。有序集成员按分数值递减(从大到小)的次序排列。 具有相同分数值的成员按字典序来排列
type RedisImp ¶
type RedisImp interface { Do(commandName string, args ...interface{}) (reply interface{}, err error) Send(commandName string, args ...interface{}) error Flush() error GetString(key string) (string, error) GetInt(key string) (int, error) GetInt64(key string) (int64, error) GetBool(key string) (bool, error) GetObject(key string, val interface{}) error Get(key string) (interface{}, error) Set(key string, val interface{}, expire int) (interface{}, error) Exists(key string) (bool, error) Del(key string) error Ttl(key string) (ttl int64, err error) Expire(key string, expire int) error Incr(key string) (val int64, err error) IncrBy(key string, amount int) (val int64, err error) Decr(key string) (val int64, err error) DecrBy(key string, amount int) (val int64, err error) Hmset(key string, val interface{}, expire int) (err error) Hset(key, field string, val interface{}) (interface{}, error) Hget(key, field string) (reply interface{}, err error) HgetString(key, field string) (reply string, err error) HgetInt(key, field string) (reply int, err error) HgetInt64(key, field string) (reply int64, err error) HgetBool(key, field string) (reply bool, err error) HgetObject(key, field string, val interface{}) error HgetAll(key string, val interface{}) error Zadd(key string, score int64, member string) (reply interface{}, err error) Zrem(key string, member string) (reply interface{}, err error) Zscore(key string, member string) (int64, error) Zrank(key, member string) (int64, error) Zrevrank(key, member string) (int64, error) Zrange(key string, from, to int64) (map[string]int64, error) Zrevrange(key string, from, to int64) (map[string]int64, error) ZrangeByScore(key string, from, to, offset int64, count int) (map[string]int64, error) ZrevrangeByScore(key string, from, to, offset int64, count int) (map[string]int64, error) Publish(channel, message string) (int, error) Blpop(channel string, time interface{}) (interface{}, error) Rpush(channel, msg string) (interface{}, error) }
Click to show internal directories.
Click to hide internal directories.