Documentation
¶
Index ¶
- Variables
- type GLRHash
- func (glh *GLRHash) HDelHashField(rdb *redis.Client, key []string, field string) error
- func (glh *GLRHash) HExistsHashField(rdb *redis.Client, key []string, field string) (int, error)
- func (glh *GLRHash) HGetAllHashField(rdb *redis.Client, key []string) ([]string, error)
- func (glh *GLRHash) HGetHashFiled(rdb *redis.Client, key []string, field string) (interface{}, error)
- func (glh *GLRHash) HIncrByFloat32HashField(rdb *redis.Client, key []string, field string, number float32)
- func (glh *GLRHash) HIncrByFloat64HashField(rdb *redis.Client, key []string, field string, number float64)
- func (glh *GLRHash) HIncrByNumberHashField(rdb *redis.Client, key []string, field string, number int64)
- func (glh *GLRHash) HIncrHashField(rdb *redis.Client, key []string, field string)
- func (glh *GLRHash) HKeysHash(rdb *redis.Client, key []string) ([]string, error)
- func (glh *GLRHash) HLenHash(rdb *redis.Client, key []string) (int, error)
- func (glh *GLRHash) HSetHashKey(rdb *redis.Client, key []string, field string, value interface{}) error
- func (glh *GLRHash) HValsHash(rdb *redis.Client, key []string) ([]interface{}, error)
- type GLRList
- type GLRPubSub
- type GLRSet
- type GLRSortedSet
- type GLRedis
- func (glr *GLRedis) DelKey(rdb *redis.Client, key []string) (int64, error)
- func (glr *GLRedis) ExistsKey(rdb *redis.Client, key []string) (int64, error)
- func (glr *GLRedis) ExpireKey(rdb *redis.Client, key []string, ttl int) (int64, error)
- func (glr *GLRedis) GetKey(rdb *redis.Client, key []string) (string, error)
- func (glr *GLRedis) GetOrSetWithExpire(rdb *redis.Client, key []string, val string, ttl int) (string, error)
- func (glr *GLRedis) GetOrSetWithoutExpire(rdb *redis.Client, key []string, val string) (string, error)
- func (glr *GLRedis) MoveKeyToDb(rdb *redis.Client, key []string, db int) (int64, error)
- func (glr *GLRedis) PatternKeys(rdb *redis.Client, key []string) ([]string, error)
- func (glr *GLRedis) PtlKey(rdb *redis.Client, key []string) (int64, error)
- func (glr *GLRedis) SetWithExpire(rdb *redis.Client, key []string, val string, ttl int) (string, error)
- func (glr *GLRedis) SetWithoutExpire(rdb *redis.Client, key []string, val string) (string, error)
- type GoLuaRedisHash
- type GoLuaRedisList
- type GoLuaRedisPubSub
- type GoLuaRedisSet
- type GoLuaRedisSortedSet
- type GoLuaRedisString
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KeyIsEmpty = errors.New("key is allowed not empty") ValuesIsEmpty = errors.New("value is allowed not empty") TtlIsNoAllowed = errors.New("ttl is not allowed 0 or less than 0") DbIsNoAllowed = errors.New("ttl is not less than 0") HashFieldIsEmpty = errors.New("hash field is empty") )
Functions ¶
This section is empty.
Types ¶
type GLRHash ¶
type GLRHash struct{}
func NewGLRHash ¶
func NewGLRHash() *GLRHash
func (*GLRHash) HDelHashField ¶
HDelHashField delete hash filed
func (*GLRHash) HExistsHashField ¶
HExistsHashField exists hash filed
func (*GLRHash) HGetAllHashField ¶
HGetAllHashField get all hash field
func (*GLRHash) HGetHashFiled ¶
func (glh *GLRHash) HGetHashFiled(rdb *redis.Client, key []string, field string) (interface{}, error)
HGetHashFiled get hash filed
func (*GLRHash) HIncrByFloat32HashField ¶
func (glh *GLRHash) HIncrByFloat32HashField(rdb *redis.Client, key []string, field string, number float32)
HIncrByFloat32HashField incr for give float32 number
func (*GLRHash) HIncrByFloat64HashField ¶
func (glh *GLRHash) HIncrByFloat64HashField(rdb *redis.Client, key []string, field string, number float64)
HIncrByFloat64HashField incr for give float64 number
func (*GLRHash) HIncrByNumberHashField ¶
func (glh *GLRHash) HIncrByNumberHashField(rdb *redis.Client, key []string, field string, number int64)
HIncrByNumberHashField incr for given number
func (*GLRHash) HIncrHashField ¶
HIncrHashField incr 1
type GLRList ¶
type GLRList struct{}
func NewGLRList ¶
func NewGLRList() *GLRList
type GLRSortedSet ¶
type GLRSortedSet struct{}
func NewGLRSortedSet ¶
func NewGLRSortedSet() *GLRSortedSet
func (*GLRSortedSet) SetZAdd ¶
func (lss *GLRSortedSet) SetZAdd(rdb *redis.Client, key []string, score, value interface{}) error
SetZAdd add sorted set element
type GLRedis ¶
type GLRedis struct{}
func NewGLRedis ¶
func NewGLRedis() *GLRedis
func (*GLRedis) ExistsKey ¶
ExistsKey check key is exists for given key exists return 1, is not exists return 0
func (*GLRedis) GetOrSetWithExpire ¶
func (glr *GLRedis) GetOrSetWithExpire(rdb *redis.Client, key []string, val string, ttl int) (string, error)
GetOrSetWithExpire get not exist, do set unit time second
func (*GLRedis) GetOrSetWithoutExpire ¶
func (glr *GLRedis) GetOrSetWithoutExpire(rdb *redis.Client, key []string, val string) (string, error)
GetOrSetWithoutExpire get not exist, do set
func (*GLRedis) MoveKeyToDb ¶
MoveKeyToDb move to selected db for given key
func (*GLRedis) PatternKeys ¶
PatternKeys return list for given pattern keys
type GoLuaRedisHash ¶
type GoLuaRedisHash interface { HSetHashKey(rdb *redis.Client, key []string, field string, value interface{}) error HDelHashField(rdb *redis.Client, key []string, field string) error HGetHashFiled(rdb *redis.Client, key []string, field string) (interface{}, error) HExistsHashField(rdb *redis.Client, key []string, field string) (int, error) HGetAllHashField(rdb *redis.Client, key []string) ([]string, error) HIncrHashField(rdb *redis.Client, key []string, field string) HIncrByNumberHashField(rdb *redis.Client, key []string, field string, number int64) HIncrByFloat64HashField(rdb *redis.Client, key []string, field string, number float64) HIncrByFloat32HashField(rdb *redis.Client, key []string, field string, number float32) HKeysHash(rdb *redis.Client, key []string) ([]string, error) HValsHash(rdb *redis.Client, key []string) ([]interface{}, error) HLenHash(rdb *redis.Client, key []string) (int, error) }
type GoLuaRedisList ¶
type GoLuaRedisPubSub ¶
type GoLuaRedisSet ¶
type GoLuaRedisSortedSet ¶
type GoLuaRedisString ¶
type GoLuaRedisString interface { SetWithExpire(rdb *redis.Client, key []string, val string, ttl int) (string, error) SetWithoutExpire(rdb *redis.Client, key []string, val string) (string, error) GetKey(rdb *redis.Client, key []string) (string, error) GetOrSetWithExpire(rdb *redis.Client, key []string, val string, ttl int) (string, error) GetOrSetWithoutExpire(rdb *redis.Client, key []string, val string) (string, error) DelKey(rdb *redis.Client, key []string) (int64, error) ExistsKey(rdb *redis.Client, key []string) (int64, error) ExpireKey(rdb *redis.Client, key []string, ttl int) (int64, error) PatternKeys(rdb *redis.Client, key []string) ([]string, error) PtlKey(rdb *redis.Client, key []string) (int64, error) MoveKeyToDb(rdb *redis.Client, key []string, db int) (int64, error) }
Click to show internal directories.
Click to hide internal directories.