Documentation ¶
Index ¶
- func Delete(key string) error
- func Deletes(key string) error
- func Exist(key string) (bool, error)
- func Get(key string) ([]byte, error)
- func GetKeyWithPrefix(prefix string, key string) string
- func Incr(key string) (int, error)
- func IncrBy(key string, value int) (int, error)
- func Ping() error
- func Set(key string, value []byte, seconds int) error
- func SetExpires(key string, seconds int)
- func Setup()
- type Configure
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKeyWithPrefix ¶
GetKeyWithPrefix return key with prefix
Types ¶
type Configure ¶
type Configure struct { Mode string `env:"APP_MODE" envDefault:"debug"` Host string `env:"REDIS_HOST" envDefault:"localhost"` Port string `env:"REDIS_PORT" envDefault:"6379"` Password string `env:"REDIS_PASSWORD" envDefault:"XNwsLoa..."` Database int `env:"REDIS_DATABASE" envDefault:"1"` MaxIdle int `env:"REDIS_MAX_IDLE" envDefault:"20"` MaxActive int `env:"REDIS_MAX_ACTIVE" envDefault:"10"` }
Configure config for redis
var Config Configure
Config global defined redis config
Click to show internal directories.
Click to hide internal directories.