Documentation
¶
Index ¶
- Variables
- type Config
- type RedisClient
- func (r *RedisClient) Del(keys ...string) error
- func (r *RedisClient) Exists(key string) (bool, error)
- func (r *RedisClient) Get(key string) (string, error)
- func (r *RedisClient) GetMap(key string) (map[string]interface{}, error)
- func (r *RedisClient) GetMaps(key string) ([]map[string]interface{}, error)
- func (r *RedisClient) HDel(key string, fields ...string) error
- func (r *RedisClient) HGet(key, field string) (string, error)
- func (r *RedisClient) HSet(key string, values ...interface{}) error
- func (r *RedisClient) Keys(pattern string) ([]string, error)
- func (r *RedisClient) Set(key string, value interface{}, expiration time.Duration) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
RC = RedisClient{} // 全局 Redis 客户端实例
)
Functions ¶
This section is empty.
Types ¶
type RedisClient ¶
type RedisClient struct {
// contains filtered or unexported fields
}
func (*RedisClient) GetMap ¶
func (r *RedisClient) GetMap(key string) (map[string]interface{}, error)
Get 获取MAP值
func (*RedisClient) GetMaps ¶
func (r *RedisClient) GetMaps(key string) ([]map[string]interface{}, error)
Get 获取MAP数组值
func (*RedisClient) HDel ¶
func (r *RedisClient) HDel(key string, fields ...string) error
HDel 删除哈希字段
func (*RedisClient) HGet ¶
func (r *RedisClient) HGet(key, field string) (string, error)
HGet 获取哈希字段
func (*RedisClient) HSet ¶
func (r *RedisClient) HSet(key string, values ...interface{}) error
HSet 设置哈希字段
Click to show internal directories.
Click to hide internal directories.