Documentation
¶
Overview ¶
Package storage is a main component of ALoLStats as it provides the interface between Storage Backend, Riot Client and serves as an interface for StatsRunner and FetchRunner
Index ¶
- type ActiveGameResponse
- type Backend
- type BackendChampion
- type BackendFreeRotation
- type BackendInternals
- type BackendLeague
- type BackendMatch
- type BackendMisc
- type BackendStats
- type BackendSummoner
- type BackendSummonerSpells
- type ChampionStats
- type ChampionStatsHistory
- type ChampionStatsPerRoleSingleHistory
- type ChampionStatsSingleHistory
- type ChampionStatsStorage
- type ChampionStatsSummary
- type ChampionStatsSummaryStorage
- type GameVersions
- type ItemStats
- type ItemStatsStorage
- type ItemStatsValues
- type LaneRolePercentage
- type LaneRolePercentagePlotly
- type QueryCursor
- type SingleItemStatsValues
- type SingleSummonerSpellsStatsValues
- type StatsValues
- type Storage
- func (s *Storage) FetchAndStoreMatch(id uint64) (*riotclient.MatchDTO, error)
- func (s *Storage) GetActiveGameBySummonerID(summonerID string) (*riotclient.CurrentGameInfoDTO, error)
- func (s *Storage) GetChampionByID(ID string, forceUpdate bool) (riotclient.Champion, error)
- func (s *Storage) GetChampionByKey(key string, forceUpdate bool) (riotclient.Champion, error)
- func (s *Storage) GetChampionByName(name string, forceUpdate bool) (riotclient.Champion, error)
- func (s *Storage) GetChampionStatsByIDGameVersionTierQueue(championID string, gameVersion string, tier string, queue string) (*ChampionStats, error)
- func (s *Storage) GetChampionStatsSummaryByGameVersionTierQueue(gameVersion, tier, queue string) (*ChampionStatsSummaryStorage, error)
- func (s *Storage) GetChampions(forceUpdate bool) riotclient.ChampionsList
- func (s *Storage) GetFeaturedGames() (*riotclient.FeaturedGamesDTO, error)
- func (s *Storage) GetFreeRotation(forceUpdate bool) riotclient.FreeRotation
- func (s *Storage) GetHandeledRequests() uint64
- func (s *Storage) GetItemStatsByIDGameVersion(championID string, gameVersion string) (*ItemStats, error)
- func (s *Storage) GetItems(gameVersion, language string) (*riotclient.ItemList, error)
- func (s *Storage) GetKnownGameVersions() (*GameVersions, error)
- func (s *Storage) GetLeagueByQueue(league string, queue string) (*riotclient.LeagueListDTO, error)
- func (s *Storage) GetLeaguesForSummonerBySummonerID(summonerID string, forceUpdate bool) (riotclient.LeaguePositionDTOList, error)
- func (s *Storage) GetMatch(id uint64) (riotclient.MatchDTO, error)
- func (s *Storage) GetMatchesByAccountID(accountID string, beginIndex uint32, endIndex uint32) (*riotclient.MatchlistDTO, error)
- func (s *Storage) GetMatchesCursorByGameVersionChampionIDMapBetweenQueueIDs(gameVersion string, championID uint64, mapID uint64, ltequeue uint64, ...) (QueryCursor, error)
- func (s *Storage) GetMatchesCursorByGameVersionMapBetweenQueueIDs(gameVersion string, mapID uint64, ltequeue uint64, gtequeue uint64) (QueryCursor, error)
- func (s *Storage) GetMatchesCursorByGameVersionMapQueueID(gameVersion string, mapID uint64, queueid uint64) (QueryCursor, error)
- func (s *Storage) GetRegionalLeagueByQueue(region string, league string, queue string) (*riotclient.LeagueListDTO, error)
- func (s *Storage) GetRegionalMatch(region string, id uint64) (riotclient.MatchDTO, error)
- func (s *Storage) GetRegionalMatchesByAccountID(region string, accountID string, beginIndex uint32, endIndex uint32) (*riotclient.MatchlistDTO, error)
- func (s *Storage) GetRegionalSummonerByName(region string, name string, forceUpdate bool) (riotclient.SummonerDTO, error)
- func (s *Storage) GetRegionalSummonerBySummonerID(region string, summonerID string, forceUpdate bool) (riotclient.SummonerDTO, error)
- func (s *Storage) GetStoredMatchesByGameVersionAndChampionID(gameVersion string, championID uint64) (riotclient.Matches, error)
- func (s *Storage) GetStoredMatchesByGameVersionChampionIDMapBetweenQueueIDs(gameVersion string, championID uint64, mapID uint64, ltequeue uint64, ...) (riotclient.Matches, error)
- func (s *Storage) GetStoredMatchesCursorByGameVersion(gameVersion string) (QueryCursor, error)
- func (s *Storage) GetSummonerByAccountID(accountID string, forceUpdate bool) (riotclient.SummonerDTO, error)
- func (s *Storage) GetSummonerByName(name string, forceUpdate bool) (riotclient.SummonerDTO, error)
- func (s *Storage) GetSummonerBySummonerID(summonerID string, forceUpdate bool) (riotclient.SummonerDTO, error)
- func (s *Storage) GetSummonerSpells(forceUpdate bool) *riotclient.SummonerSpellsList
- func (s *Storage) GetSummonerSpellsStatsByIDGameVersionTierQueue(championID, gameVersion, tier, queue string) (*SummonerSpellsStats, error)
- func (s *Storage) RegionalFetchAndStoreMatch(region string, id uint64) (*riotclient.MatchDTO, error)
- func (s *Storage) RegisterAPI(api *api.API)
- func (s *Storage) Start()
- func (s *Storage) Stop()
- func (s *Storage) StoreChampionStats(stats *ChampionStats) error
- func (s *Storage) StoreChampionStatsSummary(statsSummary *ChampionStatsSummaryStorage) error
- func (s *Storage) StoreItemStats(stats *ItemStats) error
- func (s *Storage) StoreKnownGameVersions(gameVersions *GameVersions) error
- func (s *Storage) StoreSummonerSpellsStats(stats *SummonerSpellsStats) error
- type Summary
- type Summoner
- type SummonerLeagues
- type SummonerResponse
- type SummonerSpellsStats
- type SummonerSpellsStatsStorage
- type SummonerSpellsStatsValues
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveGameResponse ¶
type ActiveGameResponse struct { }
ActiveGameResponse contains the prepare ActiveGame information for a API response
type Backend ¶
type Backend interface { BackendChampion BackendFreeRotation BackendMatch BackendSummoner BackendSummonerSpells BackendLeague BackendInternals BackendStats BackendMisc }
Backend defines an interface to store/retrieve data from Storage Backend
type BackendChampion ¶
type BackendChampion interface { GetChampions() (riotclient.ChampionsList, error) GetChampionsTimeStamp() time.Time StoreChampions(championsList riotclient.ChampionsList) error }
BackendChampion defines an interface to store/retrieve Champion data from Storage Backend
type BackendFreeRotation ¶
type BackendFreeRotation interface { GetFreeRotation() (*riotclient.FreeRotation, error) GetFreeRotationTimeStamp() time.Time StoreFreeRotation(freeRotation *riotclient.FreeRotation) error }
BackendFreeRotation defines an interfce to store/retrieve the Champions Free Rotation from Storage Backend
type BackendInternals ¶
BackendInternals defines an interface to retrieve internal infos from the Backend, e.g., number of stored elements
type BackendLeague ¶
type BackendLeague interface { GetLeagueByQueue(league string, queue string) (*riotclient.LeagueListDTO, error) GetLeagueByQueueTimeStamp(league string, queue string) (time.Time, error) StoreLeague(*riotclient.LeagueListDTO) error GetLeaguesForSummoner(summonerName string) (*SummonerLeagues, error) GetLeaguesForSummonerTimeStamp(summonerName string) (time.Time, error) GetLeaguesForSummonerBySummonerID(summonerID string) (*SummonerLeagues, error) GetLeaguesForSummonerBySummonerIDTimeStamp(summonerID string) (time.Time, error) StoreLeaguesForSummoner(*SummonerLeagues) error }
BackendLeague defines an interface to store/retrieve League data from Storage Backend
type BackendMatch ¶
type BackendMatch interface { GetMatch(matchID uint64) (*riotclient.MatchDTO, error) StoreMatch(data *riotclient.MatchDTO) error GetMatchTimeLine(matchID uint64) (*riotclient.MatchTimelineDTO, error) StoreMatchTimeLine(data *riotclient.MatchTimelineDTO) error // Specialized fetching functions GetMatchesByGameVersionAndChampionID(gameVersion string, championID uint64) (*riotclient.Matches, error) GetMatchesByGameVersionChampionIDMapQueue(gameVersion string, championID uint64, mapID uint64, queue uint64) (*riotclient.Matches, error) GetMatchesByGameVersionChampionIDMapBetweenQueueIDs(gameVersion string, championID uint64, mapID uint64, ltequeue uint64, gtequeue uint64) (*riotclient.Matches, error) // Cursor fetching functions GetMatchesCursorByGameVersion(gameVersion string) (QueryCursor, error) GetMatchesCursorByGameVersionChampionIDMapBetweenQueueIDs(gameVersion string, championID uint64, mapID uint64, ltequeue uint64, gtequeue uint64) (QueryCursor, error) GetMatchesCursorByGameVersionMapBetweenQueueIDs(gameVersion string, mapID uint64, ltequeue uint64, gtequeue uint64) (QueryCursor, error) GetMatchesCursorByGameVersionMapQueueID(gameVersion string, mapID uint64, queueid uint64) (QueryCursor, error) }
BackendMatch defines an interface to store/retrieve Match data from Storage Backend Matches have no TimeStamp as they are always valid
type BackendMisc ¶
type BackendMisc interface { GetKnownGameVersions() (*GameVersions, error) StoreKnownGameVersions(gameVersions *GameVersions) error }
BackendMisc defines an interface to generic storages from Backend
type BackendStats ¶
type BackendStats interface { GetChampionStatsByChampionIDGameVersionTierQueue(championID, gameVersion, tier, queue string) (*ChampionStatsStorage, error) StoreChampionStats(stats *ChampionStatsStorage) error GetChampionStatsSummaryByGameVersionTierQueue(gameVersion, tier, queue string) (*ChampionStatsSummaryStorage, error) StoreChampionStatsSummary(statsSummary *ChampionStatsSummaryStorage) error GetItemStatsByChampionIDGameVersion(championID, gameVersion string) (*ItemStatsStorage, error) StoreItemStats(statsStorage *ItemStatsStorage) error GetSummonerSpellsStatsByChampionIDGameVersionTierQueue(championID, gameVersion, tier, queue string) (*SummonerSpellsStatsStorage, error) StoreSummonerSpellsStats(data *SummonerSpellsStatsStorage) error }
BackendStats defines an interface to retrieve stored statistics from Backend
type BackendSummoner ¶
type BackendSummoner interface { GetSummonerByName(name string) (*Summoner, error) GetSummonerByNameTimeStamp(name string) time.Time GetSummonerBySummonerID(summonerID string) (*Summoner, error) GetSummonerBySummonerIDTimeStamp(summonerID string) time.Time GetSummonerByAccountID(accountID string) (*Summoner, error) GetSummonerByAccountIDTimeStamp(accountID string) time.Time GetSummonerByPUUID(PUUID string) (*Summoner, error) GetSummonerByPUUIDTimeStamp(PUUID string) time.Time StoreSummoner(data *Summoner) error }
BackendSummoner defines an interface to store/retrieve Summoner data from Storage Backend
type BackendSummonerSpells ¶
type BackendSummonerSpells interface { GetSummonerSpells() (*riotclient.SummonerSpellsList, error) GetSummonerSpellsTimeStamp() time.Time StoreSummonerSpells(summonerSpellsList *riotclient.SummonerSpellsList) error }
BackendSummonerSpells defines an interface to store/retrieve Summoner Spells data from Storage Backend
type ChampionStats ¶
type ChampionStats struct { ChampionID uint64 `json:"championid"` ChampionRealID string `json:"championrealid"` ChampionName string `json:"championname"` GameVersion string `json:"gameversion"` TotalGamesForGameVersion uint64 `json:"totalgamesforgameversion"` Tier string `json:"tier"` // Queue is the Queue the analysis takes into account, e.g., ALL, NORMAL_DRAFT, NORMAL_BLIND, RANKED_SOLO, RANKED_FLEX, ARAM Queue string `json:"queue"` Timestamp time.Time `json:"timestamp"` StatsValues BanRate float64 `json:"banrate"` PickRate float64 `json:"pickrate"` Roles []string `json:"roles"` StatsPerRole map[string]StatsValues `json:"statsperrole"` LaneRolePercentage []LaneRolePercentage `json:"lanerolepercentage"` LaneRolePercentagePlotly []LaneRolePercentagePlotly `json:"lanerolepercentageplotly"` }
type ChampionStatsHistory ¶
type ChampionStatsHistory struct { ChampionID uint64 `json:"championid"` ChampionRealID string `json:"championrealid"` ChampionName string `json:"championname"` Tier string `json:"tier"` // Queue is the Queue the analysis takes into account, e.g., ALL, NORMAL_DRAFT, NORMAL_BLIND, RANKED_SOLO, RANKED_FLEX, ARAM Queue string `json:"queue"` Timestamp time.Time `json:"timestamp"` ChampionStatsSingleHistory HistoryPeRrole map[string]ChampionStatsPerRoleSingleHistory `json:"historyperrole"` }
type ChampionStatsPerRoleSingleHistory ¶
type ChampionStatsPerRoleSingleHistory struct { Versions []string `json:"versions"` WinRateHistory []float64 `json:"winRateHistory"` AvgKHistory []float64 `json:"averagekillsHistory"` StdDevKHistory []float64 `json:"stddevkillsHistory"` AvgDHistory []float64 `json:"averagedeathsHistory"` StdDevDHistory []float64 `json:"stddevdeathsHistory"` AvgAHistory []float64 `json:"averageassistsHistory"` StdDevAHistory []float64 `json:"stddevassistsHistory"` }
type ChampionStatsSingleHistory ¶
type ChampionStatsSingleHistory struct { Versions []string `json:"versions"` WinRateHistory []float64 `json:"winRateHistory"` PickRateHistory []float64 `json:"pickRateHistory"` BanRateHistory []float64 `json:"banRateHistory"` AvgKHistory []float64 `json:"averagekillsHistory"` StdDevKHistory []float64 `json:"stddevkillsHistory"` AvgDHistory []float64 `json:"averagedeathsHistory"` StdDevDHistory []float64 `json:"stddevdeathsHistory"` AvgAHistory []float64 `json:"averageassistsHistory"` StdDevAHistory []float64 `json:"stddevassistsHistory"` }
type ChampionStatsStorage ¶
type ChampionStatsStorage struct { ChampionStats ChampionStats `json:"championstats"` ChampionID string `json:"championid"` ChampionKey string `json:"championkey"` ChampionName string `json:"championname"` GameVersion string `json:"gameversion"` Tier string `json:"tier"` // Queue is the Queue the analysis takes into account, e.g., ALL, NORMAL_DRAFT, NORMAL_BLIND, RANKED_SOLO, RANKED_FLEX, ARAM Queue string `json:"queue"` SampleSize uint64 `json:"samplesize"` TimeStamp time.Time `json:"timestamp"` }
type ChampionStatsSummary ¶
type ChampionStatsSummary struct { ChampionID uint64 `json:"championid"` ChampionRealID string `json:"championrealid"` ChampionName string `json:"championname"` GameVersion string `json:"gameversion"` Tier string `json:"tier"` // Queue is the Queue the analysis takes into account, e.g., ALL, NORMAL_DRAFT, NORMAL_BLIND, RANKED_SOLO, RANKED_FLEX, ARAM Queue string `json:"queue"` Timestamp time.Time `json:"timestamp"` SampleSize uint64 `json:"samplesize"` WinRate float64 `json:"winrate"` AvgK float64 `json:"averagekills"` AvgD float64 `json:"averagedeaths"` AvgA float64 `json:"averageassists"` BanRate float64 `json:"banrate"` PickRate float64 `json:"pickrate"` Roles []string `json:"roles"` }
type ChampionStatsSummaryStorage ¶
type ChampionStatsSummaryStorage struct { ChampionsStatsSummary []ChampionStatsSummary `json:"championstatssummary"` GameVersion string `json:"gameversion"` Tier string `json:"tier"` // Queue is the Queue the analysis takes into account, e.g., ALL, NORMAL_DRAFT, NORMAL_BLIND, RANKED_SOLO, RANKED_FLEX, ARAM Queue string `json:"queue"` }
type GameVersions ¶
type GameVersions struct {
Versions []string `json:"versions"`
}
GameVersions struct is a list of game versions in the format major.minor, e.g., 8.24 or 9.1.
type ItemStats ¶
type ItemStats struct { ChampionID uint64 `json:"championid"` ChampionRealID string `json:"championrealid"` ChampionName string `json:"championname"` GameVersion string `json:"gameversion"` Timestamp time.Time `json:"timestamp"` ItemStatsValues StatsPerRole map[string]ItemStatsValues `json:"statsperrole"` }
type ItemStatsStorage ¶
type ItemStatsStorage struct { ItemStats ItemStats `json:"itemstats"` ChampionID string `json:"championid"` ChampionKey string `json:"championkey"` ChampionName string `json:"championname"` GameVersion string `json:"gameversion"` SampleSize uint64 `json:"samplesize"` TimeStamp time.Time `json:"timestamp"` }
type ItemStatsValues ¶
type ItemStatsValues map[string]SingleItemStatsValues
type LaneRolePercentage ¶
type QueryCursor ¶
type SingleItemStatsValues ¶
type SingleSummonerSpellsStatsValues ¶
type SingleSummonerSpellsStatsValues struct { SampleSize uint64 `json:"samplesize"` SummonerSpells []riotclient.SummonerSpell `json:"summonerspells"` PickRate float64 `json:"pickrate"` WinRate float64 `json:"winrate"` }
type StatsValues ¶
type StatsValues struct { SampleSize uint64 `json:"samplesize"` AvgK float64 `json:"averagekills"` StdDevK float64 `json:"stddevkills"` MedianK float64 `json:"mediankills"` AvgD float64 `json:"averagedeaths"` StdDevD float64 `json:"stddevdeaths"` MedianD float64 `json:"mediandeaths"` AvgA float64 `json:"averageassists"` StdDevA float64 `json:"stddevassists"` MedianA float64 `json:"medianassists"` AvgGoldEarned float64 `json:"average_goldearned"` AvgTotalMinionsKilled float64 `json:"average_totalminionskilled"` AvgTotalHeal float64 `json:"average_totalheal"` AvgTotalDamageDealt float64 `json:"average_totaldamagedealt"` AvgTotalDamageDealtToChampions float64 `json:"average_totaldamagedealttochampions"` AvgTotalDamageTaken float64 `json:"average_totaldamagetaken"` AvgMagicDamageDealt float64 `json:"average_magicdamagedealt"` AvgMagicDamageDealtToChampions float64 `json:"average_magicdamagedealttochampions"` AvgPhysicalDamageDealt float64 `json:"average_physicaldamagedealt"` AvgPhysicalDamageDealtToChampions float64 `json:"average_physicaldamagedealttochampions"` AvgPhysicalDamageTaken float64 `json:"average_physicaldamagetaken"` AvgTrueDamageDealt float64 `json:"average_truedamagedealt"` AvgTrueDamageDealtToChampions float64 `json:"average_truedamagedealttochampions"` AvgTrueDamageTaken float64 `json:"average_truedamagetaken"` StdDevGoldEarned float64 `json:"stddev_goldearned"` StdDevTotalMinionsKilled float64 `json:"stddev_totalminionskilled"` StdDevTotalHeal float64 `json:"stddev_totalheal"` StdDevTotalDamageDealt float64 `json:"stddev_totaldamagedealt"` StdDevTotalDamageDealtToChampions float64 `json:"stddev_totaldamagedealttochampions"` StdDevTotalDamageTaken float64 `json:"stddev_totaldamagetaken"` StdDevMagicDamageDealt float64 `json:"stddev_magicdamagedealt"` StdDevMagicDamageDealtToChampions float64 `json:"stddev_magicdamagedealttochampions"` StdDevPhysicalDamageDealt float64 `json:"stddev_physicaldamagedealt"` StdDevPhysicalDamageDealtToChampions float64 `json:"stddev_physicaldamagedealttochampions"` StdDevPhysicalDamageTaken float64 `json:"stddev_physicaldamagetaken"` StdDevTrueDamageDealt float64 `json:"stddev_truedamagedealt"` StdDevTrueDamageDealtToChampions float64 `json:"stddev_truedamagedealttochampions"` StdDevTrueDamageTaken float64 `json:"stddev_truedamagetaken"` AvgDamageDealtToObjectives float64 `json:"average_damagedealttoobjectives"` AvgDamageDealtToTurrets float64 `json:"average_damagedealttoturrets"` AvgTimeCCingOthers float64 `json:"average_timeccingothers"` StdDevDamageDealtToObjectives float64 `json:"stddev_damagedealttoobjectives"` StdDevDamageDealtToTurrets float64 `json:"stddev_damagedealttoturrets"` StdDevTimeCCingOthers float64 `json:"stddev_timeccingothers"` WinLossRatio float64 `json:"winlossratio"` WinRate float64 `json:"winrate"` }
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage LoL data storage
func NewStorage ¶
func NewStorage(cfg config.LoLStorage, riotClients map[string]riotclient.Client, backend Backend) (*Storage, error)
NewStorage creates a new Riot LoL API client
func (*Storage) FetchAndStoreMatch ¶
func (s *Storage) FetchAndStoreMatch(id uint64) (*riotclient.MatchDTO, error)
FetchAndStoreMatch gets a match from Riot Client and stores it in storage backend if it doesn't exist, yet
func (*Storage) GetActiveGameBySummonerID ¶
func (s *Storage) GetActiveGameBySummonerID(summonerID string) (*riotclient.CurrentGameInfoDTO, error)
GetActiveGameBySummonerID returns the active game (live game) for the given Summoner ID
func (*Storage) GetChampionByID ¶
GetChampionByID returns a champion identified by its ID ID is a simplified name or internal Riot name for the champion forceUpdate will try to update the champion, if it is false the config settings will be considered if update is required
func (*Storage) GetChampionByKey ¶
GetChampionByKey returns a champion identified by its key key is a, for now, numeric identifier from Riot for a champion forceUpdate will try to update the champion, if it is false the config settings will be considered if update is required
func (*Storage) GetChampionByName ¶
GetChampionByName returns a champion identified by its Name name is the official name for the champion and it must match exactly, e.g. Cho'Gath forceUpdate will try to update the champion, if it is false the config settings will be considered if update is required
func (*Storage) GetChampionStatsByIDGameVersionTierQueue ¶
func (s *Storage) GetChampionStatsByIDGameVersionTierQueue(championID string, gameVersion string, tier string, queue string) (*ChampionStats, error)
GetChampionStatsByIDGameVersionTierQueue returns the Champion stats for a certain game version, tier and queue
func (*Storage) GetChampionStatsSummaryByGameVersionTierQueue ¶
func (s *Storage) GetChampionStatsSummaryByGameVersionTierQueue(gameVersion, tier, queue string) (*ChampionStatsSummaryStorage, error)
GetChampionStatsSummaryByGameVersionTierQueue returns the Champion stats for a certain game version, tier and queue
func (*Storage) GetChampions ¶
func (s *Storage) GetChampions(forceUpdate bool) riotclient.ChampionsList
GetChampions returns a list of all currently known champions forceUpdate will try to update the champion, if it is false the config settings will be considered if update is required
func (*Storage) GetFeaturedGames ¶
func (s *Storage) GetFeaturedGames() (*riotclient.FeaturedGamesDTO, error)
GetFeaturedGames returns the currently features games from Riot
func (*Storage) GetFreeRotation ¶
func (s *Storage) GetFreeRotation(forceUpdate bool) riotclient.FreeRotation
GetFreeRotation returns the current free rotation from storage When forceUpdate is true, it always fetches it vom Riot API, if it is false it depends on how old the free rotation is if it gets fetched from Riot API
func (*Storage) GetHandeledRequests ¶
GetHandeledRequests gets the total number of api requests handeled by the storage since creating it
func (*Storage) GetItemStatsByIDGameVersion ¶
func (s *Storage) GetItemStatsByIDGameVersion(championID string, gameVersion string) (*ItemStats, error)
GetItemStatsByIDGameVersion returns the Champion Item stats for a certain game version
func (*Storage) GetItems ¶
func (s *Storage) GetItems(gameVersion, language string) (*riotclient.ItemList, error)
GetItems returns a list of all items for a given gameVersion and language
func (*Storage) GetKnownGameVersions ¶
func (s *Storage) GetKnownGameVersions() (*GameVersions, error)
GetKnownGameVersions retrieves a list of known game versions
func (*Storage) GetLeagueByQueue ¶
func (s *Storage) GetLeagueByQueue(league string, queue string) (*riotclient.LeagueListDTO, error)
GetLeagueByQueue returns a league identified by its name for a specific queue name
func (*Storage) GetLeaguesForSummonerBySummonerID ¶
func (s *Storage) GetLeaguesForSummonerBySummonerID(summonerID string, forceUpdate bool) (riotclient.LeaguePositionDTOList, error)
GetLeaguesForSummonerBySummonerID returns all Leagues a Summoner is placed in, identified by Summoner ID forceUpdate will try to update the champion, if it is false the config settings will be considered if update is required
func (*Storage) GetMatch ¶
func (s *Storage) GetMatch(id uint64) (riotclient.MatchDTO, error)
GetMatch gets a match from storage or riot client based on GameID
func (*Storage) GetMatchesByAccountID ¶
func (s *Storage) GetMatchesByAccountID(accountID string, beginIndex uint32, endIndex uint32) (*riotclient.MatchlistDTO, error)
GetMatchesByAccountID gets all match references for a specified Account ID and startIndex, endIndex
func (*Storage) GetMatchesCursorByGameVersionChampionIDMapBetweenQueueIDs ¶
func (s *Storage) GetMatchesCursorByGameVersionChampionIDMapBetweenQueueIDs(gameVersion string, championID uint64, mapID uint64, ltequeue uint64, gtequeue uint64) (QueryCursor, error)
GetMatchesCursorByGameVersionChampionIDMapBetweenQueueIDs returns cursor to matches specific to a certain game version
func (*Storage) GetMatchesCursorByGameVersionMapBetweenQueueIDs ¶
func (s *Storage) GetMatchesCursorByGameVersionMapBetweenQueueIDs(gameVersion string, mapID uint64, ltequeue uint64, gtequeue uint64) (QueryCursor, error)
GetMatchesCursorByGameVersionMapBetweenQueueIDs returns cursor to matches specific to a certain game version
func (*Storage) GetMatchesCursorByGameVersionMapQueueID ¶
func (s *Storage) GetMatchesCursorByGameVersionMapQueueID(gameVersion string, mapID uint64, queueid uint64) (QueryCursor, error)
GetMatchesCursorByGameVersionMapQueueID returns cursor to matches specific to a certain game version
func (*Storage) GetRegionalLeagueByQueue ¶
func (s *Storage) GetRegionalLeagueByQueue(region string, league string, queue string) (*riotclient.LeagueListDTO, error)
GetRegionalLeagueByQueue returns a league identified by its name for a specific queue name in a specific region
func (*Storage) GetRegionalMatch ¶
GetRegionalMatch gets a match from storage or riot client based on GameID for a specific region
func (*Storage) GetRegionalMatchesByAccountID ¶
func (s *Storage) GetRegionalMatchesByAccountID(region string, accountID string, beginIndex uint32, endIndex uint32) (*riotclient.MatchlistDTO, error)
GetRegionalMatchesByAccountID gets all match references for a specified Account ID and startIndex, endIndex for a specific region
func (*Storage) GetRegionalSummonerByName ¶
func (s *Storage) GetRegionalSummonerByName(region string, name string, forceUpdate bool) (riotclient.SummonerDTO, error)
GetRegionalSummonerByName returns a Summoner identified by name for a specific region forceUpdate will try to update the champion, if it is false the config settings will be considered if update is required
func (*Storage) GetRegionalSummonerBySummonerID ¶
func (s *Storage) GetRegionalSummonerBySummonerID(region string, summonerID string, forceUpdate bool) (riotclient.SummonerDTO, error)
GetRegionalSummonerBySummonerID returns a Summoner identified by Summoner ID for a specific region forceUpdate will try to update the champion, if it is false the config settings will be considered if update is required
func (*Storage) GetStoredMatchesByGameVersionAndChampionID ¶
func (s *Storage) GetStoredMatchesByGameVersionAndChampionID(gameVersion string, championID uint64) (riotclient.Matches, error)
GetStoredMatchesByGameVersionAndChampionID gets all matches for a specific game version and Champion ID
func (*Storage) GetStoredMatchesByGameVersionChampionIDMapBetweenQueueIDs ¶
func (s *Storage) GetStoredMatchesByGameVersionChampionIDMapBetweenQueueIDs(gameVersion string, championID uint64, mapID uint64, ltequeue uint64, gtequeue uint64) (riotclient.Matches, error)
GetStoredMatchesByGameVersionChampionIDMapBetweenQueueIDs gets all matches for a specific game version, Champion ID, map id and gtequeue <= queue id <= ltequeue
func (*Storage) GetStoredMatchesCursorByGameVersion ¶
func (s *Storage) GetStoredMatchesCursorByGameVersion(gameVersion string) (QueryCursor, error)
GetStoredMatchesCursorByGameVersion returns cursor to matches specific to a certain game version
func (*Storage) GetSummonerByAccountID ¶
func (s *Storage) GetSummonerByAccountID(accountID string, forceUpdate bool) (riotclient.SummonerDTO, error)
GetSummonerByAccountID returns a Summoner identified by Account ID
func (*Storage) GetSummonerByName ¶
func (s *Storage) GetSummonerByName(name string, forceUpdate bool) (riotclient.SummonerDTO, error)
GetSummonerByName returns a Summoner identified by name forceUpdate will try to update the champion, if it is false the config settings will be considered if update is required
func (*Storage) GetSummonerBySummonerID ¶
func (s *Storage) GetSummonerBySummonerID(summonerID string, forceUpdate bool) (riotclient.SummonerDTO, error)
GetSummonerBySummonerID returns a Summoner identified by Summoner ID forceUpdate will try to update the champion, if it is false the config settings will be considered if update is required
func (*Storage) GetSummonerSpells ¶
func (s *Storage) GetSummonerSpells(forceUpdate bool) *riotclient.SummonerSpellsList
GetSummonerSpells returns a list of all currently known summoner spells forceUpdate will try to update the champion, if it is false the config settings will be considered if update is required
func (*Storage) GetSummonerSpellsStatsByIDGameVersionTierQueue ¶
func (s *Storage) GetSummonerSpellsStatsByIDGameVersionTierQueue(championID, gameVersion, tier, queue string) (*SummonerSpellsStats, error)
GetSummonerSpellsStatsByIDGameVersionTierQueue returns the Champion Summoner Spells stats for a certain game version
func (*Storage) RegionalFetchAndStoreMatch ¶
func (s *Storage) RegionalFetchAndStoreMatch(region string, id uint64) (*riotclient.MatchDTO, error)
RegionalFetchAndStoreMatch gets a match from Riot Client for a specific region and stores it in storage backend if it doesn't exist, yet
func (*Storage) RegisterAPI ¶
RegisterAPI registers all endpoints from storage to the RestAPI
func (*Storage) StoreChampionStats ¶
func (s *Storage) StoreChampionStats(stats *ChampionStats) error
StoreChampionStats stores the Champion stats for a certain game version
func (*Storage) StoreChampionStatsSummary ¶
func (s *Storage) StoreChampionStatsSummary(statsSummary *ChampionStatsSummaryStorage) error
StoreChampionStatsSummary stores the Champion stats Summary
func (*Storage) StoreItemStats ¶
StoreItemStats stores the Champion Item stats for a certain game version
func (*Storage) StoreKnownGameVersions ¶
func (s *Storage) StoreKnownGameVersions(gameVersions *GameVersions) error
StoreKnownGameVersions stores a new list of known game versions
func (*Storage) StoreSummonerSpellsStats ¶
func (s *Storage) StoreSummonerSpellsStats(stats *SummonerSpellsStats) error
StoreSummonerSpellsStats stores the Champion Summoner Spells stats for a certain game version, tier and queue
type Summary ¶
type Summary struct { NumberOfMatches uint64 `json:"numberofmatches"` NumberOfSummoners uint64 `json:"numberofsummoners"` NumberOfChampions uint64 `json:"numberofchampions"` }
Summary gives an overview of the stored data in Storage/Backend
type Summoner ¶
type Summoner struct { SummonerDTO riotclient.SummonerDTO SummonerName string SummonerID string AccountID string PUUID string }
Summoner is the storage type used for Summoner Data
type SummonerLeagues ¶
type SummonerLeagues struct { LeaguePositionDTOList riotclient.LeaguePositionDTOList SummonerName string SummonerID string }
SummonerLeagues is the storage type used for Summoner Leagues Data
type SummonerResponse ¶
type SummonerResponse struct { Name string `json:"name"` ProfileIcon int `json:"profileIconId"` SummonerLevel int64 `json:"summonerLevel"` RevisionDate int64 `json:"revisionDate"` Timestamp time.Time `json:"timestamp"` LeagueRankings riotclient.LeaguePositionDTOList `json:"leagues"` }
SummonerResponse contains summary informations of a summoner
type SummonerSpellsStats ¶
type SummonerSpellsStats struct { ChampionID uint64 `json:"championid"` ChampionRealID string `json:"championrealid"` ChampionName string `json:"championname"` GameVersion string `json:"gameversion"` TotalGamesForGameVersion uint64 `json:"totalgamesforgameversion"` Tier string `json:"tier"` // Queue is the Queue the analysis takes into account, e.g., ALL, NORMAL_DRAFT, NORMAL_BLIND, RANKED_SOLO, RANKED_FLEX, ARAM Queue string `json:"queue"` SampleSize uint64 `json:"samplesize"` Timestamp time.Time `json:"timestamp"` Stats SummonerSpellsStatsValues `json:"stats"` StatsPerRole map[string]SummonerSpellsStatsValues `json:"statsperrole"` }
type SummonerSpellsStatsStorage ¶
type SummonerSpellsStatsStorage struct { SummonerSpellsStats SummonerSpellsStats `json:"summonerspellsstats"` ChampionID string `json:"championid"` ChampionKey string `json:"championkey"` ChampionName string `json:"championname"` GameVersion string `json:"gameversion"` Tier string `json:"tier"` // Queue is the Queue the analysis takes into account, e.g., ALL, NORMAL_DRAFT, NORMAL_BLIND, RANKED_SOLO, RANKED_FLEX, ARAM Queue string `json:"queue"` SampleSize uint64 `json:"samplesize"` TimeStamp time.Time `json:"timestamp"` }
type SummonerSpellsStatsValues ¶
type SummonerSpellsStatsValues map[string]SingleSummonerSpellsStatsValues
Source Files
¶
- api.go
- backendinterface.go
- champion.go
- championendpoints.go
- cursorinterface.go
- freerotation.go
- item.go
- itemstatistics.go
- league.go
- match.go
- spectator.go
- spectatorendpoints.go
- statistics.go
- statisticsendpoints.go
- storage.go
- summoner.go
- summonerendpoints.go
- summonerspells.go
- summonerspellsendpoints.go
- summonerspellstatistics.go
- summonerspellstatisticsendpoints.go