Documentation ¶
Index ¶
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type ComplexityRoot
- type Config
- type DailyPlayerStats
- type DailyPlayerStatsRecordResolver
- type DailyTribeStats
- type DailyTribeStatsRecordResolver
- type DirectiveRoot
- type EnnoblementList
- type EnnoblementResolver
- type FoundPlayerList
- type FoundTribeList
- type PlayerHistory
- type PlayerHistoryRecordResolver
- type PlayerList
- type PlayerResolver
- type QueryResolver
- type ResolverRoot
- type ServerList
- type ServerResolver
- type ServerStats
- type TribeChangeRecordResolver
- type TribeChanges
- type TribeHistory
- type TribeHistoryRecordResolver
- type TribeList
- type VersionList
- type VillageList
- type VillageResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Building struct { BuildTime func(childComplexity int) int BuildTimeFactor func(childComplexity int) int Iron func(childComplexity int) int IronFactor func(childComplexity int) int MaxLevel func(childComplexity int) int MinLevel func(childComplexity int) int Pop func(childComplexity int) int PopFactor func(childComplexity int) int Stone func(childComplexity int) int StoneFactor func(childComplexity int) int Wood func(childComplexity int) int WoodFactor func(childComplexity int) int } BuildingConfig struct { Barracks func(childComplexity int) int Farm func(childComplexity int) int Garage func(childComplexity int) int Hide func(childComplexity int) int Iron func(childComplexity int) int Main func(childComplexity int) int Market func(childComplexity int) int Place func(childComplexity int) int Smith func(childComplexity int) int Snob func(childComplexity int) int Stable func(childComplexity int) int Statue func(childComplexity int) int Stone func(childComplexity int) int Storage func(childComplexity int) int Wall func(childComplexity int) int Watchtower func(childComplexity int) int Wood func(childComplexity int) int } DailyPlayerStats struct { Items func(childComplexity int) int Total func(childComplexity int) int } DailyPlayerStatsRecord struct { CreateDate func(childComplexity int) int ID func(childComplexity int) int Player func(childComplexity int) int Points func(childComplexity int) int Rank func(childComplexity int) int RankAtt func(childComplexity int) int RankDef func(childComplexity int) int RankSup func(childComplexity int) int RankTotal func(childComplexity int) int ScoreAtt func(childComplexity int) int ScoreDef func(childComplexity int) int ScoreSup func(childComplexity int) int ScoreTotal func(childComplexity int) int Villages func(childComplexity int) int } DailyTribeStats struct { Items func(childComplexity int) int Total func(childComplexity int) int } DailyTribeStatsRecord struct { AllPoints func(childComplexity int) int CreateDate func(childComplexity int) int Dominance func(childComplexity int) int ID func(childComplexity int) int Members func(childComplexity int) int Points func(childComplexity int) int Rank func(childComplexity int) int RankAtt func(childComplexity int) int RankDef func(childComplexity int) int RankTotal func(childComplexity int) int ScoreAtt func(childComplexity int) int ScoreDef func(childComplexity int) int ScoreTotal func(childComplexity int) int Tribe func(childComplexity int) int Villages func(childComplexity int) int } Ennoblement struct { EnnobledAt func(childComplexity int) int ID func(childComplexity int) int NewOwner func(childComplexity int) int NewOwnerTribe func(childComplexity int) int OldOwner func(childComplexity int) int OldOwnerTribe func(childComplexity int) int Village func(childComplexity int) int } EnnoblementList struct { Items func(childComplexity int) int Total func(childComplexity int) int } FoundPlayer struct { BestRank func(childComplexity int) int ID func(childComplexity int) int MostPoints func(childComplexity int) int MostVillages func(childComplexity int) int Name func(childComplexity int) int Server func(childComplexity int) int TribeID func(childComplexity int) int TribeTag func(childComplexity int) int } FoundPlayerList struct { Items func(childComplexity int) int Total func(childComplexity int) int } FoundTribe struct { BestRank func(childComplexity int) int ID func(childComplexity int) int MostPoints func(childComplexity int) int MostVillages func(childComplexity int) int Name func(childComplexity int) int Server func(childComplexity int) int Tag func(childComplexity int) int } FoundTribeList struct { Items func(childComplexity int) int Total func(childComplexity int) int } Player struct { BestRank func(childComplexity int) int BestRankAt func(childComplexity int) int DailyGrowth func(childComplexity int) int DeletedAt func(childComplexity int) int Exists func(childComplexity int) int ID func(childComplexity int) int JoinedAt func(childComplexity int) int LastActivityAt func(childComplexity int) int MostPoints func(childComplexity int) int MostPointsAt func(childComplexity int) int MostVillages func(childComplexity int) int MostVillagesAt func(childComplexity int) int Name func(childComplexity int) int NameChanges func(childComplexity int) int Points func(childComplexity int) int Rank func(childComplexity int) int RankAtt func(childComplexity int) int RankDef func(childComplexity int) int RankSup func(childComplexity int) int RankTotal func(childComplexity int) int ScoreAtt func(childComplexity int) int ScoreDef func(childComplexity int) int ScoreSup func(childComplexity int) int ScoreTotal func(childComplexity int) int Servers func(childComplexity int) int TotalVillages func(childComplexity int) int Tribe func(childComplexity int) int } PlayerHistory struct { Items func(childComplexity int) int Total func(childComplexity int) int } PlayerHistoryRecord struct { CreateDate func(childComplexity int) int ID func(childComplexity int) int Player func(childComplexity int) int Points func(childComplexity int) int Rank func(childComplexity int) int RankAtt func(childComplexity int) int RankDef func(childComplexity int) int RankSup func(childComplexity int) int RankTotal func(childComplexity int) int ScoreAtt func(childComplexity int) int ScoreDef func(childComplexity int) int ScoreSup func(childComplexity int) int ScoreTotal func(childComplexity int) int TotalVillages func(childComplexity int) int Tribe func(childComplexity int) int } PlayerList struct { Items func(childComplexity int) int Total func(childComplexity int) int } PlayerNameChange struct { ChangeDate func(childComplexity int) int NewName func(childComplexity int) int OldName func(childComplexity int) int } Query struct { DailyPlayerStats func(childComplexity int, server string, filter *twmodel.DailyPlayerStatsFilter, limit *int, offset *int, sort []string) int DailyTribeStats func(childComplexity int, server string, filter *twmodel.DailyTribeStatsFilter, limit *int, offset *int, sort []string) int Ennoblements func(childComplexity int, server string, filter *twmodel.EnnoblementFilter, limit *int, offset *int, sort []string) int Player func(childComplexity int, server string, id int) int PlayerHistory func(childComplexity int, server string, filter *twmodel.PlayerHistoryFilter, limit *int, offset *int, sort []string) int Players func(childComplexity int, server string, filter *twmodel.PlayerFilter, limit *int, offset *int, sort []string) int SearchPlayer func(childComplexity int, version string, name *string, id *int, limit *int, offset *int, sort []string) int SearchTribe func(childComplexity int, version string, query string, limit *int, offset *int, sort []string) int Server func(childComplexity int, key string) int ServerStats func(childComplexity int, server string, filter *twmodel.ServerStatsFilter, limit *int, offset *int, sort []string) int Servers func(childComplexity int, filter *twmodel.ServerFilter, limit *int, offset *int, sort []string) int Tribe func(childComplexity int, server string, id int) int TribeChanges func(childComplexity int, server string, filter *twmodel.TribeChangeFilter, limit *int, offset *int, sort []string) int TribeHistory func(childComplexity int, server string, filter *twmodel.TribeHistoryFilter, limit *int, offset *int, sort []string) int Tribes func(childComplexity int, server string, filter *twmodel.TribeFilter, limit *int, offset *int, sort []string) int Version func(childComplexity int, code twmodel.VersionCode) int Versions func(childComplexity int, filter *twmodel.VersionFilter, limit *int, offset *int, sort []string) int Village func(childComplexity int, server string, id int) int Villages func(childComplexity int, server string, filter *twmodel.VillageFilter, limit *int, offset *int, sort []string) int } Server struct { BuildingConfig func(childComplexity int) int Config func(childComplexity int) int DataUpdatedAt func(childComplexity int) int HistoryUpdatedAt func(childComplexity int) int Key func(childComplexity int) int NumberOfPlayers func(childComplexity int) int NumberOfTribes func(childComplexity int) int NumberOfVillages func(childComplexity int) int StatsUpdatedAt func(childComplexity int) int Status func(childComplexity int) int UnitConfig func(childComplexity int) int Version func(childComplexity int) int } ServerConfig struct { Ally func(childComplexity int) int Build func(childComplexity int) int Buildings func(childComplexity int) int Commands func(childComplexity int) int Coord func(childComplexity int) int Game func(childComplexity int) int Misc func(childComplexity int) int Moral func(childComplexity int) int Newbie func(childComplexity int) int Night func(childComplexity int) int Sitter func(childComplexity int) int Sleep func(childComplexity int) int Snob func(childComplexity int) int Speed func(childComplexity int) int UnitSpeed func(childComplexity int) int Win func(childComplexity int) int } ServerConfigAlly struct { AllytimeSupport func(childComplexity int) int FixedAllies func(childComplexity int) int Levels func(childComplexity int) int Limit func(childComplexity int) int NoHarm func(childComplexity int) int NoJoin func(childComplexity int) int NoLeave func(childComplexity int) int NoOtherSupport func(childComplexity int) int PointsMemberCount func(childComplexity int) int WarsAutoacceptDays func(childComplexity int) int WarsMemberRequirement func(childComplexity int) int WarsPointsRequirement func(childComplexity int) int XpRequirements func(childComplexity int) int } ServerConfigBuild struct { Destroy func(childComplexity int) int } ServerConfigBuildings struct { CustomBarracks func(childComplexity int) int CustomChurch func(childComplexity int) int CustomFarm func(childComplexity int) int CustomGarage func(childComplexity int) int CustomHide func(childComplexity int) int CustomIron func(childComplexity int) int CustomMain func(childComplexity int) int CustomMarket func(childComplexity int) int CustomPlace func(childComplexity int) int CustomSmith func(childComplexity int) int CustomSnob func(childComplexity int) int CustomStable func(childComplexity int) int CustomStatue func(childComplexity int) int CustomStone func(childComplexity int) int CustomStorage func(childComplexity int) int CustomWall func(childComplexity int) int CustomWatchtower func(childComplexity int) int CustomWood func(childComplexity int) int } ServerConfigCommands struct { CommandCancelTime func(childComplexity int) int MillisArrival func(childComplexity int) int } ServerConfigCoord struct { BonusNew func(childComplexity int) int BonusVillages func(childComplexity int) int EmptyVillages func(childComplexity int) int Func func(childComplexity int) int Inner func(childComplexity int) int MapSize func(childComplexity int) int NobleRestart func(childComplexity int) int SelectStart func(childComplexity int) int StartVillages func(childComplexity int) int VillageMoveWait func(childComplexity int) int } ServerConfigGame struct { Archer func(childComplexity int) int BarbarianMaxPoints func(childComplexity int) int BarbarianRise func(childComplexity int) int BarbarianShrink func(childComplexity int) int BaseProduction func(childComplexity int) int BuildtimeFormula func(childComplexity int) int Church func(childComplexity int) int Event func(childComplexity int) int FakeLimit func(childComplexity int) int FarmLimit func(childComplexity int) int Hauls func(childComplexity int) int HaulsBase func(childComplexity int) int HaulsMax func(childComplexity int) int Knight func(childComplexity int) int KnightNewItems func(childComplexity int) int Stronghold func(childComplexity int) int SuppressEvents func(childComplexity int) int Tech func(childComplexity int) int Watchtower func(childComplexity int) int } ServerConfigMisc struct { KillRanking func(childComplexity int) int TradeCancelTime func(childComplexity int) int Tutorial func(childComplexity int) int } ServerConfigNewbie struct { Days func(childComplexity int) int Ratio func(childComplexity int) int RatioDays func(childComplexity int) int RemoveNewbieVillages func(childComplexity int) int } ServerConfigNight struct { Active func(childComplexity int) int DefFactor func(childComplexity int) int EndHour func(childComplexity int) int StartHour func(childComplexity int) int } ServerConfigSitter struct { Allow func(childComplexity int) int } ServerConfigSleep struct { Active func(childComplexity int) int Delay func(childComplexity int) int Max func(childComplexity int) int MaxAwake func(childComplexity int) int Min func(childComplexity int) int MinAwake func(childComplexity int) int WarnTime func(childComplexity int) int } ServerConfigSnob struct { CheapRebuild func(childComplexity int) int CoinIron func(childComplexity int) int CoinStone func(childComplexity int) int CoinWood func(childComplexity int) int Factor func(childComplexity int) int Gold func(childComplexity int) int MaxDist func(childComplexity int) int NoBarbConquer func(childComplexity int) int Rise func(childComplexity int) int } ServerConfigWin struct { Check func(childComplexity int) int } ServerList struct { Items func(childComplexity int) int Total func(childComplexity int) int } ServerStats struct { Items func(childComplexity int) int Total func(childComplexity int) int } ServerStatsRecord struct { ActivePlayers func(childComplexity int) int ActiveTribes func(childComplexity int) int BarbarianVillages func(childComplexity int) int BonusVillages func(childComplexity int) int CreateDate func(childComplexity int) int ID func(childComplexity int) int InactivePlayers func(childComplexity int) int InactiveTribes func(childComplexity int) int PlayerVillages func(childComplexity int) int Players func(childComplexity int) int Tribes func(childComplexity int) int Villages func(childComplexity int) int } Tribe struct { AllPoints func(childComplexity int) int BestRank func(childComplexity int) int BestRankAt func(childComplexity int) int CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int Dominance func(childComplexity int) int Exists func(childComplexity int) int ID func(childComplexity int) int MostPoints func(childComplexity int) int MostPointsAt func(childComplexity int) int MostVillages func(childComplexity int) int MostVillagesAt func(childComplexity int) int Name func(childComplexity int) int Points func(childComplexity int) int Rank func(childComplexity int) int RankAtt func(childComplexity int) int RankDef func(childComplexity int) int RankTotal func(childComplexity int) int ScoreAtt func(childComplexity int) int ScoreDef func(childComplexity int) int ScoreTotal func(childComplexity int) int Tag func(childComplexity int) int TotalMembers func(childComplexity int) int TotalVillages func(childComplexity int) int } TribeChangeRecord struct { CreatedAt func(childComplexity int) int ID func(childComplexity int) int NewTribe func(childComplexity int) int OldTribe func(childComplexity int) int Player func(childComplexity int) int } TribeChanges struct { Items func(childComplexity int) int Total func(childComplexity int) int } TribeHistory struct { Items func(childComplexity int) int Total func(childComplexity int) int } TribeHistoryRecord struct { AllPoints func(childComplexity int) int CreateDate func(childComplexity int) int Dominance func(childComplexity int) int ID func(childComplexity int) int Points func(childComplexity int) int Rank func(childComplexity int) int RankAtt func(childComplexity int) int RankDef func(childComplexity int) int RankTotal func(childComplexity int) int ScoreAtt func(childComplexity int) int ScoreDef func(childComplexity int) int ScoreTotal func(childComplexity int) int TotalMembers func(childComplexity int) int TotalVillages func(childComplexity int) int Tribe func(childComplexity int) int } TribeList struct { Items func(childComplexity int) int Total func(childComplexity int) int } Unit struct { Attack func(childComplexity int) int BuildTime func(childComplexity int) int Carry func(childComplexity int) int Defense func(childComplexity int) int DefenseArcher func(childComplexity int) int DefenseCavalry func(childComplexity int) int Pop func(childComplexity int) int Speed func(childComplexity int) int } UnitConfig struct { Archer func(childComplexity int) int Axe func(childComplexity int) int Catapult func(childComplexity int) int Heavy func(childComplexity int) int Knight func(childComplexity int) int Light func(childComplexity int) int Marcher func(childComplexity int) int Militia func(childComplexity int) int Ram func(childComplexity int) int Snob func(childComplexity int) int Spear func(childComplexity int) int Spy func(childComplexity int) int Sword func(childComplexity int) int } Version struct { Code func(childComplexity int) int Host func(childComplexity int) int Name func(childComplexity int) int Timezone func(childComplexity int) int } VersionList struct { Items func(childComplexity int) int Total func(childComplexity int) int } Village struct { Bonus func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Player func(childComplexity int) int Points func(childComplexity int) int X func(childComplexity int) int Y func(childComplexity int) int } VillageList struct { Items func(childComplexity int) int Total func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DailyPlayerStats ¶
type DailyPlayerStats struct { Total int `json:"total"` Items []*twmodel.DailyPlayerStats `json:"items"` }
type DailyTribeStats ¶
type DailyTribeStats struct { Total int `json:"total"` Items []*twmodel.DailyTribeStats `json:"items"` }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type EnnoblementList ¶
type EnnoblementList struct { Items []*twmodel.Ennoblement `json:"items"` Total int `json:"total"` }
type EnnoblementResolver ¶
type EnnoblementResolver interface { Village(ctx context.Context, obj *twmodel.Ennoblement) (*twmodel.Village, error) NewOwner(ctx context.Context, obj *twmodel.Ennoblement) (*twmodel.Player, error) NewOwnerTribe(ctx context.Context, obj *twmodel.Ennoblement) (*twmodel.Tribe, error) OldOwner(ctx context.Context, obj *twmodel.Ennoblement) (*twmodel.Player, error) OldOwnerTribe(ctx context.Context, obj *twmodel.Ennoblement) (*twmodel.Tribe, error) }
type FoundPlayerList ¶
type FoundPlayerList struct { Items []*twmodel.FoundPlayer `json:"items"` Total int `json:"total"` }
type FoundTribeList ¶
type FoundTribeList struct { Items []*twmodel.FoundTribe `json:"items"` Total int `json:"total"` }
type PlayerHistory ¶
type PlayerHistory struct { Total int `json:"total"` Items []*twmodel.PlayerHistory `json:"items"` }
type PlayerList ¶
type PlayerResolver ¶
type QueryResolver ¶
type QueryResolver interface { DailyPlayerStats(ctx context.Context, server string, filter *twmodel.DailyPlayerStatsFilter, limit *int, offset *int, sort []string) (*DailyPlayerStats, error) DailyTribeStats(ctx context.Context, server string, filter *twmodel.DailyTribeStatsFilter, limit *int, offset *int, sort []string) (*DailyTribeStats, error) Ennoblements(ctx context.Context, server string, filter *twmodel.EnnoblementFilter, limit *int, offset *int, sort []string) (*EnnoblementList, error) Players(ctx context.Context, server string, filter *twmodel.PlayerFilter, limit *int, offset *int, sort []string) (*PlayerList, error) Player(ctx context.Context, server string, id int) (*twmodel.Player, error) SearchPlayer(ctx context.Context, version string, name *string, id *int, limit *int, offset *int, sort []string) (*FoundPlayerList, error) PlayerHistory(ctx context.Context, server string, filter *twmodel.PlayerHistoryFilter, limit *int, offset *int, sort []string) (*PlayerHistory, error) Servers(ctx context.Context, filter *twmodel.ServerFilter, limit *int, offset *int, sort []string) (*ServerList, error) Server(ctx context.Context, key string) (*twmodel.Server, error) ServerStats(ctx context.Context, server string, filter *twmodel.ServerStatsFilter, limit *int, offset *int, sort []string) (*ServerStats, error) Tribes(ctx context.Context, server string, filter *twmodel.TribeFilter, limit *int, offset *int, sort []string) (*TribeList, error) Tribe(ctx context.Context, server string, id int) (*twmodel.Tribe, error) SearchTribe(ctx context.Context, version string, query string, limit *int, offset *int, sort []string) (*FoundTribeList, error) TribeChanges(ctx context.Context, server string, filter *twmodel.TribeChangeFilter, limit *int, offset *int, sort []string) (*TribeChanges, error) TribeHistory(ctx context.Context, server string, filter *twmodel.TribeHistoryFilter, limit *int, offset *int, sort []string) (*TribeHistory, error) Versions(ctx context.Context, filter *twmodel.VersionFilter, limit *int, offset *int, sort []string) (*VersionList, error) Version(ctx context.Context, code twmodel.VersionCode) (*twmodel.Version, error) Villages(ctx context.Context, server string, filter *twmodel.VillageFilter, limit *int, offset *int, sort []string) (*VillageList, error) Village(ctx context.Context, server string, id int) (*twmodel.Village, error) }
type ResolverRoot ¶
type ResolverRoot interface { DailyPlayerStatsRecord() DailyPlayerStatsRecordResolver DailyTribeStatsRecord() DailyTribeStatsRecordResolver Ennoblement() EnnoblementResolver Player() PlayerResolver PlayerHistoryRecord() PlayerHistoryRecordResolver Query() QueryResolver Server() ServerResolver TribeChangeRecord() TribeChangeRecordResolver TribeHistoryRecord() TribeHistoryRecordResolver Village() VillageResolver }
type ServerList ¶
type ServerResolver ¶
type ServerStats ¶
type ServerStats struct { Items []*twmodel.ServerStats `json:"items"` Total int `json:"total"` }
type TribeChanges ¶
type TribeChanges struct { Total int `json:"total"` Items []*twmodel.TribeChange `json:"items"` }
type TribeHistory ¶
type TribeHistory struct { Total int `json:"total"` Items []*twmodel.TribeHistory `json:"items"` }
type VersionList ¶
type VillageList ¶
Click to show internal directories.
Click to hide internal directories.