Documentation ¶
Index ¶
- type KeyFunc
- type ScopeBaseStore
- func (s *ScopeBaseStore) CheckGet(key, scope string, options ...cache.Option) (string, error)
- func (s *ScopeBaseStore) CheckGetModel(key, scope string, value interface{}, options ...cache.Option) error
- func (s *ScopeBaseStore) CheckGetModelT(key, scope string, value interface{}, trace trace.T) error
- func (s *ScopeBaseStore) CheckGetT(key, scope string, trace trace.T) (string, error)
- func (s *ScopeBaseStore) Del(key, scope string, options ...cache.Option) (int64, error)
- func (s *ScopeBaseStore) DelT(key, scope string, trace trace.T) (int64, error)
- func (s *ScopeBaseStore) Exists(key, scope string) (bool, error)
- func (s *ScopeBaseStore) Get(key, scope string, options ...cache.Option) (string, error)
- func (s *ScopeBaseStore) GetModel(key, scope string, value interface{}, options ...cache.Option) error
- func (s *ScopeBaseStore) GetModelT(key, scope string, value interface{}, trace trace.T) error
- func (s *ScopeBaseStore) GetT(key, scope string, trace trace.T) (string, error)
- func (s *ScopeBaseStore) Set(key, scope string, value interface{}, options ...cache.Option) error
- func (s *ScopeBaseStore) SetModel(key, scope string, value interface{}, options ...cache.Option) error
- func (s *ScopeBaseStore) SetModelT(key, scope string, value interface{}, trace trace.T) error
- func (s *ScopeBaseStore) SetT(key, scope string, value interface{}, trace trace.T) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyFunc ¶
scope could be tenant id or user id or other cases, like email/phone Attention: key duplicate
type ScopeBaseStore ¶
type ScopeBaseStore struct {
// contains filtered or unexported fields
}
why not use general[T] ? because we want to use one store to store diff keys, if use [T], then we just store/handler one key
func NewWithTTL ¶
func (*ScopeBaseStore) CheckGetModel ¶
func (s *ScopeBaseStore) CheckGetModel(key, scope string, value interface{}, options ...cache.Option) error
func (*ScopeBaseStore) CheckGetModelT ¶
func (s *ScopeBaseStore) CheckGetModelT(key, scope string, value interface{}, trace trace.T) error
func (*ScopeBaseStore) GetModel ¶
func (s *ScopeBaseStore) GetModel(key, scope string, value interface{}, options ...cache.Option) error
func (*ScopeBaseStore) GetModelT ¶
func (s *ScopeBaseStore) GetModelT(key, scope string, value interface{}, trace trace.T) error
func (*ScopeBaseStore) Set ¶
func (s *ScopeBaseStore) Set(key, scope string, value interface{}, options ...cache.Option) error
func (*ScopeBaseStore) SetModel ¶
func (s *ScopeBaseStore) SetModel(key, scope string, value interface{}, options ...cache.Option) error
Click to show internal directories.
Click to hide internal directories.