Documentation ¶
Index ¶
- Constants
- func ParseUrl(redisUrl string) (*redis.Options, error)
- type Options
- type Redis
- func (r *Redis) Close()
- func (r *Redis) Get(key string) *redis.StringCmd
- func (r *Redis) GetJson(key string, result interface{}) bool
- func (r *Redis) GetJsons(keys []string, result interface{}) bool
- func (r *Redis) HGetJson(key, field string, result interface{}) bool
- func (r *Redis) HMGetAllJson(key string, result interface{})
- func (r *Redis) HSetJson(key, field string, value interface{})
- func (r *Redis) Marshal(v interface{}) string
- func (r *Redis) Set(key string, value interface{}, secs int)
- func (r *Redis) SetJson(key string, result interface{}, secs int)
- func (r *Redis) SetJsons(keys []string, values interface{}, secs int)
- func (r *Redis) SetJsonsByKv(kvs map[string]interface{}, secs int)
- func (r *Redis) Unmarshal(str string, result interface{})
- type StringCmd
Constants ¶
View Source
const ( ErrorInit = 1 + iota ErrorCmd ErrorClose ErrorMarshal ErrorTypeCast ErrorPipeline )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Redis ¶
type Redis struct {
*redis.Client
}
func NewFromOption ¶ added in v1.0.3
func NewFromOption(option *redis.Options) *Redis
func NewFromUrl ¶ added in v1.0.3
func (*Redis) HMGetAllJson ¶
func (*Redis) SetJsonsByKv ¶
Click to show internal directories.
Click to hide internal directories.