Documentation ¶
Index ¶
- type Cache
- type CacheClient
- func (cache *CacheClient) AddCharacters(streamerID string, characterInfos []*model.CharacterInfo) error
- func (cache *CacheClient) AddProfile(streamerID string, character *model.Character) error
- func (cache *CacheClient) ClearList(streamerID string) error
- func (cache *CacheClient) GetProfile(streamerID, region, realm, name string) (*model.Character, error)
- func (cache *CacheClient) List(streamerID string) ([]*model.CharacterInfo, error)
- func (cache *CacheClient) Update(streamerID string, character *model.Character) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { List(streamerID string) ([]*model.CharacterInfo, error) AddCharacters(streamerID string, characterInfos []*model.CharacterInfo) error GetProfile(streamerID, region, realm, name string) (*model.Character, error) AddProfile(streamerID string, character *model.Character) error Update(streamerID string, character *model.Character) error ClearList(streamerID string) error }
Cache is an interface for caching characters list and full character profiles
type CacheClient ¶
type CacheClient struct {
// contains filtered or unexported fields
}
func New ¶
func New(address string) *CacheClient
func (*CacheClient) AddCharacters ¶
func (cache *CacheClient) AddCharacters(streamerID string, characterInfos []*model.CharacterInfo) error
func (*CacheClient) AddProfile ¶
func (cache *CacheClient) AddProfile(streamerID string, character *model.Character) error
func (*CacheClient) ClearList ¶
func (cache *CacheClient) ClearList(streamerID string) error
func (*CacheClient) GetProfile ¶
func (cache *CacheClient) GetProfile(streamerID, region, realm, name string) (*model.Character, error)
func (*CacheClient) List ¶
func (cache *CacheClient) List(streamerID string) ([]*model.CharacterInfo, error)
Click to show internal directories.
Click to hide internal directories.