Documentation ¶
Index ¶
- type ConnectionPool
- type Keeper
- func (d Keeper) AddCandidate(p string) error
- func (d Keeper) AddCountry(c string) error
- func (d Keeper) AddPoint(key string) error
- func (d Keeper) Get(key string) (int, error)
- func (d Keeper) GetAllCandidates() ([]string, error)
- func (d Keeper) GetAllCountries() ([]string, error)
- func (d Keeper) RemoveCandidate(p string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionPool ¶
ConnectionPool used to make requests to Redis. Its size is provided by Configuration during application init.
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper is an implemetation of ScoreKeeper that uses Redis.
func NewKeeper ¶
func NewKeeper(p ConnectionPool) *Keeper
NewKeeper returns pointer to created Keeper instance initialized with Redis pool.
func (Keeper) AddCandidate ¶
AddCandidate adds the one to current voting.
func (Keeper) AddCountry ¶
AddCountry will create country record in set of all countries.
func (Keeper) GetAllCandidates ¶
GetAllCandidates returns all candidates currently taking part in voting.
func (Keeper) GetAllCountries ¶
GetAllCountries returnes all countries that were participating during voting.
func (Keeper) RemoveCandidate ¶
RemoveCandidate deletes single candidate with specified name.
Click to show internal directories.
Click to hide internal directories.