Versions in this module Expand all Collapse all v0 v0.0.13 Dec 20, 2023 Changes in this version + const DefaultMaxActive v0.0.12 Mar 3, 2022 v0.0.11 Jun 18, 2021 Changes in this version type Redis + func (db *Redis) HMSetMapInfo(ctx context.Context, key string, values map[string]interface{}) *BoolCmd v0.0.10 Jun 2, 2021 v0.0.9 Jun 1, 2021 v0.0.8 Jun 1, 2021 v0.0.7 Jun 1, 2021 v0.0.6 May 18, 2021 v0.0.5 Apr 15, 2021 v0.0.4 Apr 15, 2021 v0.0.3 Apr 15, 2021 v0.0.1 Mar 25, 2021 Changes in this version + const DefaultGroupName + const DefaultRedisPort + func ClearConfig() + func RemoveConfig(name ...string) + func SetConfig(config Config, name ...string) + func SetConfigByStr(str string, name ...string) error + type BoolCmd = redis.BoolCmd + type Cmd = redis.Cmd + type Config struct + ConnectTimeout time.Duration + Db int + Host string + IdleTimeout time.Duration + MaxActive int + MaxConnLifetime time.Duration + MaxIdle int + Pass string + Port int + TLS bool + TLSSkipVerify bool + func ConfigFromStr(str string) (config Config, err error) + func GetConfig(name ...string) (config Config, ok bool) + type Conn struct + type Options = redis.Options + type Redis struct + func Instance(name ...string) *Redis + func New(config Config) *Redis + func NewFromStr(str string) (*Redis, error) + func (db *Redis) AddHMObject(ctx context.Context, entity, key string, value interface{}) error + func (db *Redis) AddObject(ctx context.Context, key string, value interface{}, duration time.Duration) error + func (db *Redis) DeleteHMObject(ctx context.Context, entity, key string) error + func (db *Redis) DeleteObject(ctx context.Context, key string) error + func (db *Redis) GetAllHMObjects(ctx context.Context, entity string) (map[string]string, error) + func (db *Redis) GetHMObject(ctx context.Context, entity, key string, value interface{}) error + func (db *Redis) GetObject(ctx context.Context, key string, value interface{}) error + func (db *Redis) HMSetEX(key string, fields map[string]interface{}, expiration time.Duration) *Cmd + func (db *Redis) HScanIter(key, match string, count int64) *ScansCmd + func (db *Redis) HSetEX(key, field string, value interface{}, expiration time.Duration) *Cmd + func (db *Redis) IsReady(ctx context.Context) bool + func (db *Redis) LPushTrim(key string, length int64, values ...interface{}) *Cmd + func (db *Redis) RPushTrim(key string, length int64, values ...interface{}) *Cmd + func (db *Redis) SScanIter(key, match string, count int64) *ScansCmd + func (db *Redis) ScanIter(pattern string, count int64) *ScansCmd + func (db *Redis) ZAddRemByRank(key string, length int64, members ...Z) *Cmd + func (db *Redis) ZScanIter(key, match string, count int64) *ScansCmd + func (r *Redis) Close() error + func (r *Redis) GetClient() *redis.Client + func (r *Redis) SetIdleTimeout(value time.Duration) + func (r *Redis) SetMaxActive(value int) + func (r *Redis) SetMaxConnLifetime(value time.Duration) + func (r *Redis) SetMaxIdle(value int) + type ScanCmd = redis.ScanCmd + type ScansCmd struct + func NewScansCmd() *ScansCmd + func (c *ScansCmd) Result() (keys []string, err error) + func (c *ScansCmd) String() (strSlice []string) + func (c *ScansCmd) Val() (keys []string) + type Z = redis.Z