cache

package
v0.0.0-...-f67852a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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)

func (*CacheClient) Update

func (cache *CacheClient) Update(streamerID string, character *model.Character) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL