Documentation ¶
Index ¶
- func SetEncryptKeys(key, iv []byte)
- func StringsToInterfaces(in []string) []interface{}
- type Config
- type Redis
- func (rd *Redis) CopyByLogger(logger *log.Logger) *Redis
- func (rd *Redis) DECR(key string) int64
- func (rd *Redis) DEL(keys ...string) int
- func (rd *Redis) Destroy() error
- func (rd *Redis) Do(cmd string, values ...interface{}) *Result
- func (rd *Redis) EXISTS(key string) bool
- func (rd *Redis) EXPIRE(key string, second int) bool
- func (rd *Redis) GET(key string) *Result
- func (rd *Redis) GETSET(key string, value interface{}) *Result
- func (rd *Redis) GetConnection() redis.Conn
- func (rd *Redis) GetLogger() *log.Logger
- func (rd *Redis) GetPool() *redis.Pool
- func (rd *Redis) HDECR(key, field string) int64
- func (rd *Redis) HDEL(key string, fields ...string) int
- func (rd *Redis) HEXISTS(key, field string) bool
- func (rd *Redis) HGET(key, field string) *Result
- func (rd *Redis) HGETALL(key string) map[string]*Result
- func (rd *Redis) HINCR(key, field string) int64
- func (rd *Redis) HKEYS(key string) []string
- func (rd *Redis) HLEN(key string) int
- func (rd *Redis) HMGET(key string, fields ...string) []Result
- func (rd *Redis) HMSET(key string, fieldAndValues ...interface{}) bool
- func (rd *Redis) HSET(key, field string, value interface{}) bool
- func (rd *Redis) HSETNX(key, field string, value interface{}) bool
- func (rd *Redis) INCR(key string) int64
- func (rd *Redis) KEYS(patten string) []string
- func (rd *Redis) LLEN(key string) int
- func (rd *Redis) LPOP(key string) *Result
- func (rd *Redis) LPUSH(key string, values ...string) int
- func (rd *Redis) LRANGE(key string, start, stop int) []Result
- func (rd *Redis) LogError(error string)
- func (rd *Redis) LogQuery(query string, args []interface{}, usedTime float32)
- func (rd *Redis) LogQueryError(error string, query string, args []interface{}, usedTime float32)
- func (rd *Redis) MGET(keys ...string) []Result
- func (rd *Redis) MSET(keyAndValues ...interface{}) bool
- func (rd *Redis) PUBLISH(channel, data string) bool
- func (rd *Redis) RPOP(key string) *Result
- func (rd *Redis) RPUSH(key string, values ...string) int
- func (rd *Redis) SET(key string, value interface{}) bool
- func (rd *Redis) SETEX(key string, seconds int, value interface{}) bool
- func (rd *Redis) SETNX(key string, value interface{}) bool
- func (rd *Redis) SetLogger(logger *log.Logger)
- func (rd *Redis) Start()
- func (rd *Redis) Stop()
- func (rd *Redis) Subscribe(name string, reset func(), received func([]byte)) bool
- func (rd *Redis) Unsubscribe(name string) bool
- type Result
- func (rs *Result) Bool() bool
- func (rs *Result) Bytes() []byte
- func (rs *Result) Float() float32
- func (rs *Result) Float64() float64
- func (rs *Result) Int() int
- func (rs *Result) Int16() int16
- func (rs *Result) Int32() int32
- func (rs *Result) Int64() int64
- func (rs *Result) Int8() int8
- func (rs *Result) IntMap() map[string]int
- func (rs *Result) Ints() []int
- func (rs *Result) ResultMap() map[string]*Result
- func (rs *Result) Results() []Result
- func (rs *Result) String() string
- func (rs *Result) StringMap() map[string]string
- func (rs *Result) Strings() []string
- func (rs *Result) To(result interface{}) error
- func (rs *Result) ToValue(t reflect.Type) reflect.Value
- func (rs *Result) Uint() uint
- func (rs *Result) Uint16() uint16
- func (rs *Result) Uint32() uint32
- func (rs *Result) Uint64() uint64
- func (rs *Result) Uint8() uint8
- type SubCallbacks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetEncryptKeys ¶
func SetEncryptKeys(key, iv []byte)
func StringsToInterfaces ¶
func StringsToInterfaces(in []string) []interface{}
Types ¶
type Config ¶ added in v0.0.3
type Config struct { Host string Password string DB int MaxActive int MaxIdle int IdleTimeout config.Duration ConnectTimeout config.Duration ReadTimeout config.Duration WriteTimeout config.Duration LogSlow config.Duration // contains filtered or unexported fields }
func (*Config) ConfigureBy ¶ added in v0.1.17
type Redis ¶
type Redis struct { ReadTimeout int Config *Config Error error SubRunning bool // contains filtered or unexported fields }
func (*Redis) CopyByLogger ¶ added in v0.1.17
func (*Redis) GetConnection ¶
func (*Redis) LogQueryError ¶ added in v0.0.4
func (*Redis) Unsubscribe ¶ added in v0.1.17
type SubCallbacks ¶ added in v0.1.17
type SubCallbacks struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.