Documentation ¶
Index ¶
- func Connect(config map[string]interface{}) *redis.Pool
- func ToInt(data interface{}) int
- func ToString(data interface{}) string
- type RedisClient
- func (this *RedisClient) Blpop(key string, timeout int) []string
- func (this *RedisClient) BrPopLpush(key, key1 string, timeout int) string
- func (this *RedisClient) Brpop(key string, timeout int) []string
- func (this *RedisClient) Command(cmd string, keys ...interface{}) (str string, err error)
- func (this *RedisClient) Del(key string) (bool, error)
- func (this *RedisClient) Get(key string) string
- func (this *RedisClient) Hdel(key string, agrs ...interface{}) int
- func (this *RedisClient) Hexists(key string, agrs ...interface{}) int
- func (this *RedisClient) Hget(key string, agrs ...interface{}) string
- func (this *RedisClient) Hgetall(key string) map[string]string
- func (this *RedisClient) Hkeys(key string) []string
- func (this *RedisClient) Hlen(key string) int
- func (this *RedisClient) Hmget(key string, field interface{}) string
- func (this *RedisClient) Hmset(key string, field, value interface{}) bool
- func (this *RedisClient) Lindex(key string, index int) string
- func (this *RedisClient) Llen(key string) int
- func (this *RedisClient) Lpop(key string) string
- func (this *RedisClient) Lpush(key string, args ...interface{}) int
- func (this *RedisClient) Lrem(key string, count int, value interface{}) int
- func (this *RedisClient) RedisExpire(key string, expire int)
- func (this *RedisClient) Rpop(key string) string
- func (this *RedisClient) RpopLpush(key, key1 string) (string, error)
- func (this *RedisClient) Set(key, str string, args ...int) bool
- func (this *RedisClient) SetNx(key, str string, args ...int) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RedisClient ¶
func (*RedisClient) Blpop ¶
func (this *RedisClient) Blpop(key string, timeout int) []string
*
- 堵塞读取数据
func (*RedisClient) BrPopLpush ¶
func (this *RedisClient) BrPopLpush(key, key1 string, timeout int) string
*
- 堵塞读取数据
func (*RedisClient) Brpop ¶
func (this *RedisClient) Brpop(key string, timeout int) []string
*
- 堵塞读取数据
func (*RedisClient) Command ¶
func (this *RedisClient) Command(cmd string, keys ...interface{}) (str string, err error)
*
- 获取redis数据
func (*RedisClient) Hdel ¶
func (this *RedisClient) Hdel(key string, agrs ...interface{}) int
*
- 删除一个或多个哈希表字段
func (*RedisClient) Hexists ¶
func (this *RedisClient) Hexists(key string, agrs ...interface{}) int
*
- 查看哈希表 key 中,指定的字段是否存在。
func (*RedisClient) Hget ¶
func (this *RedisClient) Hget(key string, agrs ...interface{}) string
*
- 获取存储在哈希表中指定字段的值。
func (*RedisClient) Hgetall ¶
func (this *RedisClient) Hgetall(key string) map[string]string
*
- 获取存储在哈希表中指定字段的值。
func (*RedisClient) Hmget ¶
func (this *RedisClient) Hmget(key string, field interface{}) string
*
- 获取所有给定字段的值。
func (*RedisClient) Hmset ¶
func (this *RedisClient) Hmset(key string, field, value interface{}) bool
*
- 此命令会覆盖哈希表中已存在的字段。
func (*RedisClient) Lindex ¶
func (this *RedisClient) Lindex(key string, index int) string
*
- 通过索引获取列表中的元素
func (*RedisClient) Lpush ¶
func (this *RedisClient) Lpush(key string, args ...interface{}) int
*
- 插入列表数据
func (*RedisClient) Lrem ¶
func (this *RedisClient) Lrem(key string, count int, value interface{}) int
*
- 删除列表数据
func (*RedisClient) RedisExpire ¶
func (this *RedisClient) RedisExpire(key string, expire int)
*
- 设置时效性
Click to show internal directories.
Click to hide internal directories.