Documentation
¶
Overview ¶
Package mongobackend provides a MongoDB storage backend for use with the storage package.
Index ¶
- type Backend
- func (b *Backend) GetChampionStatsByChampionIDGameVersionTierQueue(championID, gameVersion, tier, queue string) (*storage.ChampionStatsStorage, error)
- func (b *Backend) GetChampionStatsSummaryByGameVersionTierQueue(gameVersion, tier, queue string) (*storage.ChampionStatsSummaryStorage, error)
- func (b *Backend) GetChampions() (riotclient.ChampionsList, error)
- func (b *Backend) GetChampionsCount() (uint64, error)
- func (b *Backend) GetChampionsTimeStamp() time.Time
- func (b *Backend) GetFreeRotation() (*riotclient.FreeRotation, error)
- func (b *Backend) GetFreeRotationTimeStamp() time.Time
- func (b *Backend) GetItemStatsByChampionIDGameVersion(championID, gameVersion string) (*storage.ItemStatsStorage, error)
- func (b *Backend) GetKnownGameVersions() (*storage.GameVersions, error)
- func (b *Backend) GetLeagueByQueue(league string, queue string) (*riotclient.LeagueListDTO, error)
- func (b *Backend) GetLeagueByQueueTimeStamp(league string, queue string) (time.Time, error)
- func (b *Backend) GetLeaguesForSummoner(summonerName string) (*storage.SummonerLeagues, error)
- func (b *Backend) GetLeaguesForSummonerBySummonerID(summonerID string) (*storage.SummonerLeagues, error)
- func (b *Backend) GetLeaguesForSummonerBySummonerIDTimeStamp(summonerID string) (time.Time, error)
- func (b *Backend) GetLeaguesForSummonerTimeStamp(summonerName string) (time.Time, error)
- func (b *Backend) GetMatch(id uint64) (*riotclient.MatchDTO, error)
- func (b *Backend) GetMatchTimeLine(matchID uint64) (*riotclient.MatchTimelineDTO, error)
- func (b *Backend) GetMatchesByGameVersion(gameVersion string) (*riotclient.Matches, error)
- func (b *Backend) GetMatchesByGameVersionAndChampionID(gameVersion string, championID uint64) (*riotclient.Matches, error)
- func (b *Backend) GetMatchesByGameVersionChampionIDMapBetweenQueueIDs(gameVersion string, championID uint64, mapID uint64, ltequeue uint64, ...) (*riotclient.Matches, error)
- func (b *Backend) GetMatchesByGameVersionChampionIDMapQueue(gameVersion string, championID uint64, mapID uint64, queueID uint64) (*riotclient.Matches, error)
- func (b *Backend) GetMatchesCount() (uint64, error)
- func (b *Backend) GetMatchesCursorByGameVersion(gameVersion string) (storage.QueryCursor, error)
- func (b *Backend) GetMatchesCursorByGameVersionChampionIDMapBetweenQueueIDs(gameVersion string, championID uint64, mapID uint64, ltequeue uint64, ...) (storage.QueryCursor, error)
- func (b *Backend) GetMatchesCursorByGameVersionMapBetweenQueueIDs(gameVersion string, mapID uint64, ltequeue uint64, gtequeue uint64) (storage.QueryCursor, error)
- func (b *Backend) GetMatchesCursorByGameVersionMapQueueID(gameVersion string, mapID uint64, queueID uint64) (storage.QueryCursor, error)
- func (b *Backend) GetStorageSummary() (storage.Summary, error)
- func (b *Backend) GetSummonerByAccountID(accountID string) (*storage.Summoner, error)
- func (b *Backend) GetSummonerByAccountIDTimeStamp(accountID string) time.Time
- func (b *Backend) GetSummonerByName(name string) (*storage.Summoner, error)
- func (b *Backend) GetSummonerByNameTimeStamp(name string) time.Time
- func (b *Backend) GetSummonerByPUUID(PUUID string) (*storage.Summoner, error)
- func (b *Backend) GetSummonerByPUUIDTimeStamp(PUUID string) time.Time
- func (b *Backend) GetSummonerBySummonerID(summonerID string) (*storage.Summoner, error)
- func (b *Backend) GetSummonerBySummonerIDTimeStamp(summonerID string) time.Time
- func (b *Backend) GetSummonerSpells() (*riotclient.SummonerSpellsList, error)
- func (b *Backend) GetSummonerSpellsStatsByChampionIDGameVersionTierQueue(championID, gameVersion, tier, queue string) (*storage.SummonerSpellsStatsStorage, error)
- func (b *Backend) GetSummonerSpellsTimeStamp() time.Time
- func (b *Backend) GetSummonersCount() (uint64, error)
- func (b *Backend) StoreChampionStats(data *storage.ChampionStatsStorage) error
- func (b *Backend) StoreChampionStatsSummary(data *storage.ChampionStatsSummaryStorage) error
- func (b *Backend) StoreChampions(championList riotclient.ChampionsList) error
- func (b *Backend) StoreFreeRotation(data *riotclient.FreeRotation) error
- func (b *Backend) StoreItemStats(data *storage.ItemStatsStorage) error
- func (b *Backend) StoreKnownGameVersions(data *storage.GameVersions) error
- func (b *Backend) StoreLeague(*riotclient.LeagueListDTO) error
- func (b *Backend) StoreLeaguesForSummoner(leagues *storage.SummonerLeagues) error
- func (b *Backend) StoreMatch(data *riotclient.MatchDTO) error
- func (b *Backend) StoreMatchTimeLine(data *riotclient.MatchTimelineDTO) error
- func (b *Backend) StoreSummoner(data *storage.Summoner) error
- func (b *Backend) StoreSummonerSpells(summnerSpellsList *riotclient.SummonerSpellsList) error
- func (b *Backend) StoreSummonerSpellsStats(data *storage.SummonerSpellsStatsStorage) error
- type MatchCursor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend represents the Mongo Backend
func NewBackend ¶
func NewBackend(cfg config.MongoBackend) (*Backend, error)
NewBackend creates a new Mongo Backend
func (*Backend) GetChampionStatsByChampionIDGameVersionTierQueue ¶
func (b *Backend) GetChampionStatsByChampionIDGameVersionTierQueue(championID, gameVersion, tier, queue string) (*storage.ChampionStatsStorage, error)
GetChampionStatsByChampionIDGameVersionTierQueue returns all stats specific to a certain game version, champion id and tier and queue
func (*Backend) GetChampionStatsSummaryByGameVersionTierQueue ¶
func (b *Backend) GetChampionStatsSummaryByGameVersionTierQueue(gameVersion, tier, queue string) (*storage.ChampionStatsSummaryStorage, error)
GetChampionStatsSummaryByGameVersionTierQueue returns the stats summary for a specific game version, queue and tier
func (*Backend) GetChampions ¶
func (b *Backend) GetChampions() (riotclient.ChampionsList, error)
GetChampions gets the champions list from storage
func (*Backend) GetChampionsCount ¶
GetChampionsCount gets the number of champions from storage
func (*Backend) GetChampionsTimeStamp ¶
GetChampionsTimeStamp gets the timestamp of the stored champions list
func (*Backend) GetFreeRotation ¶
func (b *Backend) GetFreeRotation() (*riotclient.FreeRotation, error)
GetFreeRotation gets the stored free champions rotation
func (*Backend) GetFreeRotationTimeStamp ¶
GetFreeRotationTimeStamp gets the timestamp of the stored free champions rotation
func (*Backend) GetItemStatsByChampionIDGameVersion ¶
func (b *Backend) GetItemStatsByChampionIDGameVersion(championID, gameVersion string) (*storage.ItemStatsStorage, error)
GetItemStatsByChampionIDGameVersion returns all item stats specific to a certain game version and champion id
func (*Backend) GetKnownGameVersions ¶
func (b *Backend) GetKnownGameVersions() (*storage.GameVersions, error)
GetKnownGameVersions gets the stored known game versions
func (*Backend) GetLeagueByQueue ¶
func (b *Backend) GetLeagueByQueue(league string, queue string) (*riotclient.LeagueListDTO, error)
func (*Backend) GetLeagueByQueueTimeStamp ¶
func (*Backend) GetLeaguesForSummoner ¶
func (b *Backend) GetLeaguesForSummoner(summonerName string) (*storage.SummonerLeagues, error)
GetLeaguesForSummoner returns the stores League information for a certain Summoner identified by its name
func (*Backend) GetLeaguesForSummonerBySummonerID ¶
func (b *Backend) GetLeaguesForSummonerBySummonerID(summonerID string) (*storage.SummonerLeagues, error)
GetLeaguesForSummonerBySummonerID returns the stores League information for a certain Summoner identified by its Summoner ID
func (*Backend) GetLeaguesForSummonerBySummonerIDTimeStamp ¶
GetLeaguesForSummonerBySummonerIDTimeStamp gets the timestamp of the stored Leagues for Summoner idenfitied by ID
func (*Backend) GetLeaguesForSummonerTimeStamp ¶
GetLeaguesForSummonerTimeStamp gets the timestamp of the stored Leagues for Summoner idenfitied by name
func (*Backend) GetMatch ¶
func (b *Backend) GetMatch(id uint64) (*riotclient.MatchDTO, error)
GetMatch retreives match data for given id
func (*Backend) GetMatchTimeLine ¶
func (b *Backend) GetMatchTimeLine(matchID uint64) (*riotclient.MatchTimelineDTO, error)
func (*Backend) GetMatchesByGameVersion ¶
func (b *Backend) GetMatchesByGameVersion(gameVersion string) (*riotclient.Matches, error)
GetMatchesByGameVersion returns all matches specific to a certain game version from Storage
func (*Backend) GetMatchesByGameVersionAndChampionID ¶
func (b *Backend) GetMatchesByGameVersionAndChampionID(gameVersion string, championID uint64) (*riotclient.Matches, error)
GetMatchesByGameVersionAndChampionID returns all matches specific to a certain game version and champion id
func (*Backend) GetMatchesByGameVersionChampionIDMapBetweenQueueIDs ¶
func (b *Backend) GetMatchesByGameVersionChampionIDMapBetweenQueueIDs(gameVersion string, championID uint64, mapID uint64, ltequeue uint64, gtequeue uint64) (*riotclient.Matches, error)
GetMatchesByGameVersionChampionIDMapBetweenQueueIDs returns all matches specific to a certain game version, champion id, map id and queue ids between and equal to ltequeue <= queueid <= gtequeue
func (*Backend) GetMatchesByGameVersionChampionIDMapQueue ¶
func (b *Backend) GetMatchesByGameVersionChampionIDMapQueue(gameVersion string, championID uint64, mapID uint64, queueID uint64) (*riotclient.Matches, error)
GetMatchesByGameVersionChampionIDMapQueue returns all matches specific to a certain game version, champion id, map id and queue id
func (*Backend) GetMatchesCount ¶
GetMatchesCount returns the number of stored Matches in the Backend
func (*Backend) GetMatchesCursorByGameVersion ¶
func (b *Backend) GetMatchesCursorByGameVersion(gameVersion string) (storage.QueryCursor, error)
GetMatchesCursorByGameVersion returns cursor to matches specific to a certain game version
func (*Backend) GetMatchesCursorByGameVersionChampionIDMapBetweenQueueIDs ¶
func (b *Backend) GetMatchesCursorByGameVersionChampionIDMapBetweenQueueIDs(gameVersion string, championID uint64, mapID uint64, ltequeue uint64, gtequeue uint64) (storage.QueryCursor, error)
GetMatchesCursorByGameVersionChampionIDMapBetweenQueueIDs returns cursor to matches specific to a certain game version, champion id, map id and queue ids between and equal to ltequeue <= queueid <= gtequeue
func (*Backend) GetMatchesCursorByGameVersionMapBetweenQueueIDs ¶
func (b *Backend) GetMatchesCursorByGameVersionMapBetweenQueueIDs(gameVersion string, mapID uint64, ltequeue uint64, gtequeue uint64) (storage.QueryCursor, error)
GetMatchesCursorByGameVersionMapBetweenQueueIDs returns cursor to matches specific to a certain game version, map id and queue ids between and equal to ltequeue <= queueid <= gtequeue
func (*Backend) GetMatchesCursorByGameVersionMapQueueID ¶
func (b *Backend) GetMatchesCursorByGameVersionMapQueueID(gameVersion string, mapID uint64, queueID uint64) (storage.QueryCursor, error)
GetMatchesCursorByGameVersionMapQueueID returns cursor to matches specific to a certain game version, map id and queue id
func (*Backend) GetStorageSummary ¶
GetStorageSummary returns stats about the stored elements in the Backend
func (*Backend) GetSummonerByAccountID ¶
GetSummonerByAccountID retrieves a summoner identified by its Account ID
func (*Backend) GetSummonerByAccountIDTimeStamp ¶
GetSummonerByAccountIDTimeStamp retrieves a summoners time stamp by its Account ID
func (*Backend) GetSummonerByName ¶
GetSummonerByName retrieves a summoner by name
func (*Backend) GetSummonerByNameTimeStamp ¶
GetSummonerByNameTimeStamp gets the Timestamp when the data was stored for the Summoner specified by name
func (*Backend) GetSummonerByPUUID ¶
GetSummonerByPUUID retrieves a summoner identified by its PUUID
func (*Backend) GetSummonerByPUUIDTimeStamp ¶
GetSummonerByPUUIDTimeStamp retrieves a summoners time stamp by its PUUID
func (*Backend) GetSummonerBySummonerID ¶
GetSummonerBySummonerID retrieves a summoner identified by its Summoner ID
func (*Backend) GetSummonerBySummonerIDTimeStamp ¶
GetSummonerBySummonerIDTimeStamp retrieves a summoners time stamp by its Summoner ID
func (*Backend) GetSummonerSpells ¶
func (b *Backend) GetSummonerSpells() (*riotclient.SummonerSpellsList, error)
GetSummonerSpells gets the summoner spells list from storage
func (*Backend) GetSummonerSpellsStatsByChampionIDGameVersionTierQueue ¶
func (b *Backend) GetSummonerSpellsStatsByChampionIDGameVersionTierQueue(championID, gameVersion, tier, queue string) (*storage.SummonerSpellsStatsStorage, error)
GetSummonerSpellsStatsByChampionIDGameVersionTierQueue returns all stats specific to a certain game version, champion id and tier and queue
func (*Backend) GetSummonerSpellsTimeStamp ¶
GetSummonerSpellsTimeStamp gets the timestamp of the stored champions list
func (*Backend) GetSummonersCount ¶
GetSummonersCount returns the number of stored Summoners in the Backend
func (*Backend) StoreChampionStats ¶
func (b *Backend) StoreChampionStats(data *storage.ChampionStatsStorage) error
StoreChampionStats stores new champion stats in storage
func (*Backend) StoreChampionStatsSummary ¶
func (b *Backend) StoreChampionStatsSummary(data *storage.ChampionStatsSummaryStorage) error
StoreChampionStatsSummary stores a Champion Statistics Summary in the db
func (*Backend) StoreChampions ¶
func (b *Backend) StoreChampions(championList riotclient.ChampionsList) error
StoreChampions stores a new champions list
func (*Backend) StoreFreeRotation ¶
func (b *Backend) StoreFreeRotation(data *riotclient.FreeRotation) error
StoreFreeRotation stores a new free champions rotation list
func (*Backend) StoreItemStats ¶
func (b *Backend) StoreItemStats(data *storage.ItemStatsStorage) error
StoreItemStats stores new champion item stats in storage
func (*Backend) StoreKnownGameVersions ¶
func (b *Backend) StoreKnownGameVersions(data *storage.GameVersions) error
StoreKnownGameVersions stores a new list of known game versions
func (*Backend) StoreLeague ¶
func (b *Backend) StoreLeague(*riotclient.LeagueListDTO) error
func (*Backend) StoreLeaguesForSummoner ¶
func (b *Backend) StoreLeaguesForSummoner(leagues *storage.SummonerLeagues) error
StoreLeaguesForSummoner stores new Summoner League information data
func (*Backend) StoreMatch ¶
func (b *Backend) StoreMatch(data *riotclient.MatchDTO) error
StoreMatch stores new match data
func (*Backend) StoreMatchTimeLine ¶
func (b *Backend) StoreMatchTimeLine(data *riotclient.MatchTimelineDTO) error
func (*Backend) StoreSummoner ¶
StoreSummoner stores new Summoner data
func (*Backend) StoreSummonerSpells ¶
func (b *Backend) StoreSummonerSpells(summnerSpellsList *riotclient.SummonerSpellsList) error
StoreSummonerSpells stores a new champions list
func (*Backend) StoreSummonerSpellsStats ¶
func (b *Backend) StoreSummonerSpellsStats(data *storage.SummonerSpellsStatsStorage) error
StoreSummonerSpellsStats stores new summonerspells stats in storage
type MatchCursor ¶
type MatchCursor struct {
// contains filtered or unexported fields
}
MatchCursor is the cursor implementation for Match queries
func (*MatchCursor) Decode ¶
func (c *MatchCursor) Decode(i interface{}) error
Decode decodes the current result
func (*MatchCursor) Next ¶
func (c *MatchCursor) Next() bool
Next gets the next result from the cursor. Returns true if there were no errors and there is a next result.