Documentation ¶
Index ¶
- func Convert(bnetProfile *bnet.CharacterProfile) *model.Character
- type CachableCharacterService
- func (s *CachableCharacterService) Add(streamerID, region, realm, name string) error
- func (s *CachableCharacterService) Delete(streamerID, region, realm, name string) error
- func (s *CachableCharacterService) List(streamerID string) ([]*model.CharacterInfo, error)
- func (s *CachableCharacterService) Profile(streamerID, region, realm, name string) (*model.Character, error)
- type CharacterService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CachableCharacterService ¶
type CachableCharacterService struct {
// contains filtered or unexported fields
}
CachableCharacterService implements CharacterService interface It caches and stores data in db. If not found, searches data in Bnet.API
func New ¶
func New(cache cache.Cache, storage storage.CharacterRepository, bnetClient *bnet.Client) *CachableCharacterService
func (*CachableCharacterService) Add ¶
func (s *CachableCharacterService) Add(streamerID, region, realm, name string) error
func (*CachableCharacterService) Delete ¶
func (s *CachableCharacterService) Delete(streamerID, region, realm, name string) error
func (*CachableCharacterService) List ¶
func (s *CachableCharacterService) List(streamerID string) ([]*model.CharacterInfo, error)
type CharacterService ¶
type CharacterService interface { // Get short characters info. Returns empty slice if no characters List(streamerID string) ([]*model.CharacterInfo, error) // Add new character to storage. If character exists with such realm - name pair, error is thrown Add(streamerID, region, realm, name string) error // Delete character from storage Delete(streamerID, region, realm, name string) error // Retrieve full character profile Profile(streamerID, region, realm, name string) (*model.Character, error) }
CharacterService allows to view currently added WoW characters, add new characters, delete character and get a detailed info of selected character
Click to show internal directories.
Click to hide internal directories.