Documentation ¶
Index ¶
- func Delete(key string) error
- func Expire(key string, t int64) error
- func Get(key string) interface{}
- func GetBytes(key *string) (*[]byte, error)
- func Init(opts *Config) error
- func IsExist(key string) bool
- func Set(key string, val interface{}, timeout time.Duration) error
- func SetAdd(key string, data ...interface{}) error
- func SetBytes(key *string, data *[]byte, timeout time.Duration) error
- func SetIsMember(key string, member interface{}) (interface{}, error)
- func SetRem(key string, data ...interface{}) error
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetIsMember ¶ added in v1.0.5
集合Set判断是否存在成员member,结果.(int64)==1表示存在
Types ¶
type Config ¶
type Config struct { Host string `yml:"host" json:"host"` Password string `yml:"password" json:"password"` Database int `yml:"database" json:"database"` MaxIdle int `yml:"max_idle" json:"max_idle"` MaxActive int `yml:"max_active" json:"max_active"` IdleTimeout int `yml:"idle_timeout" json:"idle_timeout"` //second }
Config 配置
Click to show internal directories.
Click to hide internal directories.