Documentation ¶
Index ¶
- Constants
- type GetFunc
- type Store
- func (s *Store) GetBytes(key string) ([]byte, error)
- func (s *Store) GetDel(key string) (string, error)
- func (s *Store) GetInt(key string) (int, error)
- func (s *Store) GetInt64(key string) (int64, error)
- func (s *Store) Read(key string, obj interface{}) (bool, error)
- func (s *Store) ReadOrGet(key string, obj interface{}, gf GetFunc, seconds ...int) error
- func (s *Store) SetInt(key string, value int, seconds ...int) error
- func (s *Store) SetInt64(key string, value int64, seconds ...int) error
- func (s *Store) SetString(key, value string, seconds ...int) error
- func (s *Store) Write(key string, obj interface{}, seconds ...int) error
Constants ¶
View Source
const ( // CacheLaunchpadCorporationInfo 公司信息缓存 // Cache:ServiceName:KeyPre 缓存key定义规范 CacheLaunchpadCorporationInfo = "cache:launchpad:corporation" // CacheAdminMemberTokenPrefix 成员令牌数据缓存key前缀 CacheAdminMemberTokenPrefix = "cache:admin:member_token:" // LimitNotifyEmailSubscribePrefix 订阅邮件key前缀 // Limit:ServiceName:KeyPre 限流器key定义规范 LimitNotifyEmailSubscribePrefix = "limit:notify:email:" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
Store 键值存取器结构详情
func (*Store) ReadOrGet ¶
ReadOrGet 将给定key所关联的值反序列化到obj对象 若给定key不存在则调用数据获取函数,调用成功时赋值至obj对象 并将其序列化后关联到给定key,seconds为key的过期时间(秒)
Click to show internal directories.
Click to hide internal directories.