Documentation ¶
Index ¶
- type Config
- type Redigo
- func (rdg *Redigo) Close() error
- func (rdg *Redigo) Delete(ctx context.Context, key string) (int, error)
- func (rdg *Redigo) Expire(ctx context.Context, key string, duration int) (int, error)
- func (rdg *Redigo) Get(ctx context.Context, key string) (string, error)
- func (rdg *Redigo) HDel(ctx context.Context, key string, fields ...string) (int, error)
- func (rdg *Redigo) HGet(ctx context.Context, key, field string) (string, error)
- func (rdg *Redigo) HGetAll(ctx context.Context, key string) (map[string]string, error)
- func (rdg *Redigo) HMGet(ctx context.Context, key string, fields ...string) ([]string, error)
- func (rdg *Redigo) HMSet(ctx context.Context, key string, kv map[string]interface{}) (string, error)
- func (rdg *Redigo) HSet(ctx context.Context, key, field string, value interface{}) (int, error)
- func (rdg *Redigo) HSetEX(ctx context.Context, key, field string, value interface{}, expire int) (int, error)
- func (rdg *Redigo) Increment(ctx context.Context, key string) (int, error)
- func (rdg *Redigo) IncrementBy(ctx context.Context, key string, amount int) (int, error)
- func (rdg *Redigo) IsErrNil(err error) bool
- func (rdg *Redigo) IsResponseOK(result string) bool
- func (rdg *Redigo) LIndex(ctx context.Context, key string, index int) (string, error)
- func (rdg *Redigo) LLen(ctx context.Context, key string) (int, error)
- func (rdg *Redigo) LPop(ctx context.Context, key string) (string, error)
- func (rdg *Redigo) LPush(ctx context.Context, key string, values ...interface{}) (int, error)
- func (rdg *Redigo) LPushX(ctx context.Context, key string, values ...interface{}) (int, error)
- func (rdg *Redigo) LRem(ctx context.Context, key, value string, count int) (int, error)
- func (rdg *Redigo) LSet(ctx context.Context, key, value string, index int) (int, error)
- func (rdg *Redigo) LTrim(ctx context.Context, key string, start, stop int) (string, error)
- func (rdg *Redigo) MGet(ctx context.Context, keys ...string) ([]string, error)
- func (rdg *Redigo) MSet(ctx context.Context, pairs ...interface{}) (string, error)
- func (rdg *Redigo) Ping(ctx context.Context) (string, error)
- func (rdg *Redigo) Set(ctx context.Context, key string, value interface{}) (string, error)
- func (rdg *Redigo) SetEX(ctx context.Context, key string, value interface{}, expire int) (string, error)
- func (rdg *Redigo) SetNX(ctx context.Context, key string, value interface{}, expire int) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redigo ¶
type Redigo struct {
// contains filtered or unexported fields
}
Redigo redis
func (*Redigo) HMSet ¶
func (rdg *Redigo) HMSet(ctx context.Context, key string, kv map[string]interface{}) (string, error)
HMSet function please use basic types only (no struct, array, or map) for kv value
func (*Redigo) HSetEX ¶
func (rdg *Redigo) HSetEX(ctx context.Context, key, field string, value interface{}, expire int) (int, error)
HSetEX key and value and sets the expiration to the given `expire` seconds
func (*Redigo) IncrementBy ¶
IncrementBy key
func (*Redigo) IsResponseOK ¶
IsResponseOK return true if result value of command is ok
func (*Redigo) MSet ¶
MSet keys and values please use basic types only (no struct, array, or map) for arguments
Click to show internal directories.
Click to hide internal directories.