Documentation ¶
Index ¶
- type Redis
- func (r *Redis) DecrBy(key string, value int64) (int64, error)
- func (r *Redis) Del(key ...string) error
- func (r *Redis) Delete(key string) error
- func (r *Redis) Do(cmd, key, seconds string) error
- func (r *Redis) Expire(key string, seconds time.Duration) (bool, error)
- func (r *Redis) Fetch(key string, fc func() interface{}) (string, error)
- func (r *Redis) Get(key string) (string, error)
- func (r *Redis) GetByte(key string) ([]byte, error)
- func (r *Redis) HDel(key string, field string) error
- func (r *Redis) HExists(key string, field string) (bool, error)
- func (r *Redis) HGet(key string, field string) (string, error)
- func (r *Redis) HGetall(key string) (map[string]string, error)
- func (r *Redis) HLen(key string) (int64, error)
- func (r *Redis) HMSet(key string, fields map[string]interface{}) error
- func (r *Redis) HSet(key string, field string, value interface{}) error
- func (r *Redis) IncrBy(key string, value int64) (int64, error)
- func (r *Redis) Keys(pattern string) ([]string, error)
- func (r *Redis) LIndex(key string, index int64) (string, error)
- func (r *Redis) LLen(key string) (int64, error)
- func (r *Redis) LPop(key string) (string, error)
- func (r *Redis) LPush(key string, value interface{}) error
- func (r *Redis) LRange(key string) ([]string, error)
- func (r *Redis) LRem(key string, value interface{}) error
- func (r *Redis) LSet(key string, index int64, value interface{}) (string, error)
- func (r *Redis) RPush(key string, value ...interface{}) error
- func (r *Redis) SAdd(key string, members ...interface{}) error
- func (r *Redis) SCard(key string) (int64, error)
- func (r *Redis) SIsMember(key string, field string) (bool, error)
- func (r *Redis) SMembers(key string) ([]string, error)
- func (r *Redis) SRandMember(key string) (string, error)
- func (r *Redis) SRem(key string, members ...interface{}) error
- func (r *Redis) Scan(cursor uint64, match string, count int64) ([]string, uint64, error)
- func (r *Redis) Set(key string, value interface{}) error
- func (r *Redis) Unmarshal(key string, object interface{}) error
- func (r *Redis) ZAdd(key string, members ...redis.Z) error
- func (r *Redis) ZRangeWithScores(key string, start, stop int64) ([]redis.Z, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redis ¶
Redis provides a cache backed by a Redis server.
func (*Redis) Fetch ¶
Fetch returns the value for the key if it exists or sets and returns the value via the passed function.
func (*Redis) SRandMember ¶
SCard 返回名称为key的set的元素个数
func (*Redis) Unmarshal ¶
Unmarshal retrieves a value from the Redis server and unmarshals it into the passed object.
Click to show internal directories.
Click to hide internal directories.