Documentation ¶
Index ¶
- Variables
- func ClientPasswordHash(email, password string) string
- type Cache
- type LocalCache
- type RedisCache
- func (rc *RedisCache) Close() error
- func (rc *RedisCache) Delete(key string) error
- func (rc *RedisCache) Get(key string) (interface{}, bool)
- func (rc *RedisCache) GetInt(key string) (result int, isSuccess bool)
- func (cb *RedisCache) GetKey(tab constant.CacheTab, unique string) string
- func (rc *RedisCache) Increment(key string, number int64) error
- func (rc *RedisCache) Init() error
- func (rc *RedisCache) Set(key string, value interface{}, duration time.Duration)
Constants ¶
This section is empty.
Variables ¶
View Source
var Data data
View Source
var (
ErrDataIsEmpty = errors.New("数据不可为空")
)
View Source
var Str str
Functions ¶
func ClientPasswordHash ¶
Types ¶
type LocalCache ¶
type LocalCache struct { local_cache.Cache // contains filtered or unexported fields }
func (*LocalCache) Close ¶
func (r *LocalCache) Close() error
func (*LocalCache) Delete ¶
func (r *LocalCache) Delete(key string) error
func (*LocalCache) Init ¶
func (r *LocalCache) Init() error
type RedisCache ¶
type RedisCache struct { DB int Addr string Password string // contains filtered or unexported fields }
func (*RedisCache) Close ¶
func (rc *RedisCache) Close() error
func (*RedisCache) Delete ¶
func (rc *RedisCache) Delete(key string) error
func (*RedisCache) Get ¶
func (rc *RedisCache) Get(key string) (interface{}, bool)
func (*RedisCache) Init ¶
func (rc *RedisCache) Init() error
Click to show internal directories.
Click to hide internal directories.