Documentation ¶
Index ¶
- Variables
- func Decode(b []byte, ptr interface{}) error
- func Encode(val interface{}) ([]byte, error)
- type RedisUtil
- func (ru *RedisUtil) Decr(ctx context.Context, key string) (res int64, err error)
- func (ru *RedisUtil) DecrBy(ctx context.Context, key string, diff int64) (res int64, err error)
- func (ru *RedisUtil) Del(ctx context.Context, key string) (err error)
- func (ru *RedisUtil) Expire(ctx context.Context, key string, ttl int) (err error)
- func (ru *RedisUtil) Get(ctx context.Context, key string, value interface{}) (hit bool, err error)
- func (ru *RedisUtil) Incr(ctx context.Context, key string) (res int64, err error)
- func (ru *RedisUtil) IncrBy(ctx context.Context, key string, diff int64) (res int64, err error)
- func (ru *RedisUtil) Set(ctx context.Context, key string, value interface{}, ttl int) (err error)
- func (ru *RedisUtil) TTL(ctx context.Context, key string) (ttl int, err error)
- func (ru *RedisUtil) WrapDo(ctx context.Context, doFunction func(con redis.Conn) error) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidNum = errors.New("Invalid num")
Functions ¶
Types ¶
type RedisUtil ¶
type RedisUtil struct {
// contains filtered or unexported fields
}
func NewRedisUtil ¶
Click to show internal directories.
Click to hide internal directories.