Documentation ¶
Index ¶
- func RegKeyValCreator(typeName string, creator KeyValCreatorFunc)
- type KeyValClient
- type KeyValCreatorFunc
- type RedisKeyVal
- func (o *RedisKeyVal) AtIndex(key string, index int64) string
- func (o *RedisKeyVal) AtIndexInt(key string, index int64) int
- func (o *RedisKeyVal) Decr(key string) int64
- func (o *RedisKeyVal) Del(key string) error
- func (o *RedisKeyVal) Expire(key string, ttl time.Duration) error
- func (o *RedisKeyVal) Get(key string) string
- func (o *RedisKeyVal) GetInt(key string) int
- func (o *RedisKeyVal) HDel(key string, fields ...string) error
- func (o *RedisKeyVal) HGet(key, field string) string
- func (o *RedisKeyVal) HGetAll(key string) map[string]string
- func (o *RedisKeyVal) HLen(key string) int
- func (o *RedisKeyVal) HScan(key, pattern string, from, count int) map[string]string
- func (o *RedisKeyVal) HSet(key string, values map[string]interface{}) error
- func (o *RedisKeyVal) HSetNX(key string, values map[string]interface{}) error
- func (o *RedisKeyVal) Incr(key string) int64
- func (o *RedisKeyVal) LPop(key string) string
- func (o *RedisKeyVal) LPopCount(key string, count int) []string
- func (o *RedisKeyVal) LPopInt(key string) int
- func (o *RedisKeyVal) LPush(key string, val interface{}) error
- func (o *RedisKeyVal) Len(key string) int64
- func (o *RedisKeyVal) RPop(key string) string
- func (o *RedisKeyVal) RPopCount(key string, count int) []string
- func (o *RedisKeyVal) RPopInt(key string) int
- func (o *RedisKeyVal) RPush(key string, val interface{}) error
- func (o *RedisKeyVal) Range(key string, start int64, stop int64) []string
- func (o *RedisKeyVal) Set(key string, val interface{}, ttl ...time.Duration) error
- func (o *RedisKeyVal) SetNX(key string, val interface{}, ttl ...time.Duration) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegKeyValCreator ¶
func RegKeyValCreator(typeName string, creator KeyValCreatorFunc)
Types ¶
type KeyValClient ¶
type KeyValClient interface { Set(key string, val interface{}, ttl ...time.Duration) error SetNX(key string, val interface{}, ttl ...time.Duration) bool Get(key string) string GetInt(key string) int Del(key string) error Incr(key string) int64 Decr(key string) int64 LPush(key string, val interface{}) error LPop(key string) string LPopCount(key string, count int) []string LPopInt(key string) int RPush(key string, val interface{}) error RPop(key string) string RPopCount(key string, count int) []string RPopInt(key string) int Len(key string) int64 AtIndex(key string, index int64) string AtIndexInt(key string, index int64) int Range(key string, start int64, stop int64) []string HSet(key string, values map[string]interface{}) error HSetNX(key string, values map[string]interface{}) error HGet(key, field string) string HGetAll(key string) map[string]string HDel(key string, fields ...string) error HLen(key string) int HScan(key, pattern string, from, count int) map[string]string Expire(key string, ttl time.Duration) error }
func Get ¶
func Get(name ...string) KeyValClient
type KeyValCreatorFunc ¶
type KeyValCreatorFunc func(url string) (KeyValClient, error)
type RedisKeyVal ¶
type RedisKeyVal struct {
// contains filtered or unexported fields
}
func (*RedisKeyVal) AtIndexInt ¶
func (o *RedisKeyVal) AtIndexInt(key string, index int64) int
func (*RedisKeyVal) Decr ¶
func (o *RedisKeyVal) Decr(key string) int64
func (*RedisKeyVal) Del ¶
func (o *RedisKeyVal) Del(key string) error
func (*RedisKeyVal) Get ¶
func (o *RedisKeyVal) Get(key string) string
func (*RedisKeyVal) GetInt ¶
func (o *RedisKeyVal) GetInt(key string) int
func (*RedisKeyVal) HGet ¶
func (o *RedisKeyVal) HGet(key, field string) string
func (*RedisKeyVal) HLen ¶ added in v0.1.15
func (o *RedisKeyVal) HLen(key string) int
func (*RedisKeyVal) HScan ¶ added in v0.1.15
func (o *RedisKeyVal) HScan(key, pattern string, from, count int) map[string]string
func (*RedisKeyVal) HSet ¶
func (o *RedisKeyVal) HSet(key string, values map[string]interface{}) error
func (*RedisKeyVal) HSetNX ¶ added in v0.1.17
func (o *RedisKeyVal) HSetNX(key string, values map[string]interface{}) error
func (*RedisKeyVal) Incr ¶
func (o *RedisKeyVal) Incr(key string) int64
func (*RedisKeyVal) LPop ¶
func (o *RedisKeyVal) LPop(key string) string
func (*RedisKeyVal) LPopCount ¶ added in v0.1.16
func (o *RedisKeyVal) LPopCount(key string, count int) []string
func (*RedisKeyVal) LPopInt ¶
func (o *RedisKeyVal) LPopInt(key string) int
func (*RedisKeyVal) LPush ¶
func (o *RedisKeyVal) LPush(key string, val interface{}) error
func (*RedisKeyVal) Len ¶
func (o *RedisKeyVal) Len(key string) int64
func (*RedisKeyVal) RPop ¶
func (o *RedisKeyVal) RPop(key string) string
func (*RedisKeyVal) RPopCount ¶ added in v0.1.16
func (o *RedisKeyVal) RPopCount(key string, count int) []string
func (*RedisKeyVal) RPopInt ¶
func (o *RedisKeyVal) RPopInt(key string) int
func (*RedisKeyVal) RPush ¶
func (o *RedisKeyVal) RPush(key string, val interface{}) error
func (*RedisKeyVal) Range ¶
func (o *RedisKeyVal) Range(key string, start int64, stop int64) []string
Click to show internal directories.
Click to hide internal directories.