Documentation ¶
Index ¶
- Variables
- type CacheData
- func (t *CacheData) AppendList(key string, data ...any)
- func (t *CacheData) DeleteAll()
- func (t *CacheData) DeleteListFirst(key string)
- func (t *CacheData) DeleteMark(mark string)
- func (t *CacheData) DeleteSearchMark(mark string)
- func (t *CacheData) FindKeys(mark string) (data []string, err error)
- func (t *CacheData) GetBool(mark string) (data bool, err error)
- func (t *CacheData) GetByte(mark string) (data []byte, err error)
- func (t *CacheData) GetFloat64(mark string) (data float64, err error)
- func (t *CacheData) GetInt(mark string) (data int, err error)
- func (t *CacheData) GetInt64(mark string) (data int64, err error)
- func (t *CacheData) GetListAll(key string, data any) (err error)
- func (t *CacheData) GetListLen(key string) (count int, err error)
- func (t *CacheData) GetRedisDB() (db *redis.Pool)
- func (t *CacheData) GetScanStruct(mark string, data []any) (err error)
- func (t *CacheData) GetString(mark string) (data string, err error)
- func (t *CacheData) GetStruct(mark string, data interface{}) (err error)
- func (t *CacheData) Init(setMode string)
- func (t *CacheData) InitRedis(url string, password string, num int) (err error)
- func (t *CacheData) SetAny(mark string, val any, expire int)
- func (t *CacheData) SetBool(mark string, val bool, expire int)
- func (t *CacheData) SetInt(mark string, val int, expire int)
- func (t *CacheData) SetInt64(mark string, val int64, expire int)
- func (t *CacheData) SetString(mark string, val string, expire int)
- func (t *CacheData) SetStruct(mark string, val any, expire int)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //CacheTime6Sec 6秒过期时间 CacheTime6Sec = 6 //CacheTime1Minutes 1分钟过期时间 CacheTime1Minutes = 60 //CacheTime1Hour 1小时过期时间 CacheTime1Hour = 3600 //CacheTime1Day 1天过期时间 CacheTime1Day = CacheTime1Hour * 24 //CacheTime2Day 2天过期时间 CacheTime2Day = CacheTime1Day * 2 //CacheTime3Day 3天过期时间 CacheTime3Day = CacheTime1Day * 3 //CacheTime1Week 1周过期时间 CacheTime1Week = CacheTime1Day * 7 //CacheTime1Month 1个月过期时间 CacheTime1Month = CacheTime1Day * 30 //CacheTime1Year 一年过期时间 CacheTime1Year = CacheTime1Month * 12 )
Functions ¶
This section is empty.
Types ¶
type CacheData ¶
type CacheData struct {
// contains filtered or unexported fields
}
func (*CacheData) AppendList ¶
AppendList 向列表末尾插入数据
func (*CacheData) DeleteListFirst ¶
DeleteListFirst 删除列表第一条数据
func (*CacheData) DeleteMark ¶
func (*CacheData) DeleteSearchMark ¶
func (*CacheData) GetFloat64 ¶
func (*CacheData) GetListAll ¶
GetListAll 获取列表所有数据
func (*CacheData) GetListLen ¶
GetListLen 获取列表长度
func (*CacheData) GetRedisDB ¶
GetRedisDB 获取缓冲redis数据库原始数据
func (*CacheData) GetScanStruct ¶
Click to show internal directories.
Click to hide internal directories.