Documentation ¶
Index ¶
- type APIError
- type Building
- type BuildingInfo
- type Date
- type Ennoblement
- type ErrorResp
- type GetBuildingInfoResp
- type GetPlayerResp
- type GetServerConfigResp
- type GetServerResp
- type GetTribeResp
- type GetUnitInfoResp
- type GetVersionResp
- type GetVillageResp
- type ListEnnoblementsResp
- type ListPlayerOtherServersResp
- type ListPlayerSnapshotsResp
- type ListPlayersResp
- type ListServersResp
- type ListTribeChangesResp
- type ListTribeSnapshotsResp
- type ListTribesResp
- type ListVersionsResp
- type ListVillagesResp
- type NullPlayerMeta
- type NullTime
- type NullTribeMeta
- type Player
- type PlayerMeta
- type PlayerSnapshot
- type PlayerWithServer
- type Server
- type ServerConfig
- type ServerConfigAlly
- type ServerConfigBuild
- type ServerConfigBuildings
- type ServerConfigCommands
- type ServerConfigCoord
- type ServerConfigGame
- type ServerConfigMisc
- type ServerConfigNewbie
- type ServerConfigNight
- type ServerConfigSitter
- type ServerConfigSleep
- type ServerConfigSnob
- type ServerConfigWin
- type ServerMeta
- type Tribe
- type TribeChange
- type TribeMeta
- type TribeSnapshot
- type Unit
- type UnitInfo
- type Version
- type Village
- type VillageMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Building ¶
type Building struct { MaxLevel int8 `json:"maxLevel"` MinLevel int8 `json:"minLevel"` Wood int32 `json:"wood"` Stone int32 `json:"stone"` Iron int32 `json:"iron"` Pop int16 `json:"pop"` WoodFactor float64 `json:"woodFactor"` StoneFactor float64 `json:"stoneFactor"` IronFactor float64 `json:"ironFactor"` PopFactor float64 `json:"popFactor"` BuildTime float64 `json:"buildTime"` BuildTimeFactor float64 `json:"buildTimeFactor"` } // @name Building
type BuildingInfo ¶
type BuildingInfo struct { Main Building `json:"main"` Barracks Building `json:"barracks"` Stable Building `json:"stable"` Garage Building `json:"garage"` Watchtower Building `json:"watchtower"` Snob Building `json:"snob"` Smith Building `json:"smith"` Place Building `json:"place"` Statue Building `json:"statue"` Market Building `json:"market"` Wood Building `json:"wood"` Stone Building `json:"stone"` Iron Building `json:"iron"` Farm Building `json:"farm"` Storage Building `json:"storage"` Hide Building `json:"hide"` Wall Building `json:"wall"` } // @name BuildingInfo
func NewBuildingInfo ¶
func NewBuildingInfo(info domain.BuildingInfo) BuildingInfo
type Date ¶ added in v0.10.0
func (Date) MarshalJSON ¶ added in v0.10.0
func (*Date) UnmarshalJSON ¶ added in v0.10.0
type Ennoblement ¶
type Ennoblement struct { ID int64 `json:"id"` Village VillageMeta `json:"village"` NewOwner NullPlayerMeta `json:"newOwner" extensions:"x-nullable"` Points int64 `json:"points"` CreatedAt time.Time `json:"createdAt" format:"date-time"` } // @name Ennoblement
func NewEnnoblement ¶
func NewEnnoblement(e domain.EnnoblementWithRelations) Ennoblement
type GetBuildingInfoResp ¶ added in v0.8.0
type GetBuildingInfoResp struct { Data BuildingInfo `json:"data"` } // @name GetBuildingInfoResp
func NewGetBuildingInfoResp ¶ added in v0.8.0
func NewGetBuildingInfoResp(cfg domain.BuildingInfo) GetBuildingInfoResp
type GetPlayerResp ¶
type GetPlayerResp struct { Data Player `json:"data"` } // @name GetPlayerResp
func NewGetPlayerResp ¶
func NewGetPlayerResp(v domain.PlayerWithRelations) GetPlayerResp
type GetServerConfigResp ¶ added in v0.8.0
type GetServerConfigResp struct { Data ServerConfig `json:"data"` } // @name GetServerConfigResp
func NewGetServerConfigResp ¶ added in v0.8.0
func NewGetServerConfigResp(cfg domain.ServerConfig) GetServerConfigResp
type GetServerResp ¶
type GetServerResp struct { Data Server `json:"data"` } // @name GetServerResp
func NewGetServerResp ¶
func NewGetServerResp(v domain.Server) GetServerResp
type GetTribeResp ¶
type GetTribeResp struct { Data Tribe `json:"data"` } // @name GetTribeResp
func NewGetTribeResp ¶
func NewGetTribeResp(v domain.Tribe) GetTribeResp
type GetUnitInfoResp ¶ added in v0.8.0
type GetUnitInfoResp struct { Data UnitInfo `json:"data"` } // @name GetUnitInfoResp
func NewGetUnitInfoResp ¶ added in v0.8.0
func NewGetUnitInfoResp(cfg domain.UnitInfo) GetUnitInfoResp
type GetVersionResp ¶
type GetVersionResp struct { Data Version `json:"data"` } // @name GetVersionResp
func NewGetVersionResp ¶
func NewGetVersionResp(v domain.Version) GetVersionResp
type GetVillageResp ¶
type GetVillageResp struct { Data Village `json:"data"` } // @name GetVillageResp
func NewGetVillageResp ¶
func NewGetVillageResp(v domain.VillageWithRelations) GetVillageResp
type ListEnnoblementsResp ¶
type ListEnnoblementsResp struct { Data []Ennoblement `json:"data"` } // @name ListEnnoblementsResp
func NewListEnnoblementsResp ¶
func NewListEnnoblementsResp(ennoblements []domain.EnnoblementWithRelations) ListEnnoblementsResp
type ListPlayerOtherServersResp ¶ added in v0.8.3
type ListPlayerOtherServersResp struct { Data []PlayerWithServer `json:"data"` } // @name ListPlayerOtherServersResp
func NewListPlayerOtherServersResp ¶ added in v0.8.3
func NewListPlayerOtherServersResp(players []domain.PlayerWithRelations) ListPlayerOtherServersResp
type ListPlayerSnapshotsResp ¶ added in v0.7.0
type ListPlayerSnapshotsResp struct { Data []PlayerSnapshot `json:"data"` } // @name ListPlayerSnapshotsResp
func NewListPlayerSnapshotsResp ¶ added in v0.7.0
func NewListPlayerSnapshotsResp(snapshots []domain.PlayerSnapshotWithRelations) ListPlayerSnapshotsResp
type ListPlayersResp ¶
type ListPlayersResp struct { Data []Player `json:"data"` } // @name ListPlayersResp
func NewListPlayersResp ¶
func NewListPlayersResp(players []domain.PlayerWithRelations) ListPlayersResp
type ListServersResp ¶
type ListServersResp struct { Data []Server `json:"data"` } // @name ListServersResp
func NewListServersResp ¶
func NewListServersResp(servers []domain.Server) ListServersResp
type ListTribeChangesResp ¶ added in v0.7.5
type ListTribeChangesResp struct { Data []TribeChange `json:"data"` } // @name ListTribeChangesResp
func NewListTribeChangesResp ¶ added in v0.7.5
func NewListTribeChangesResp(tcs []domain.TribeChangeWithRelations) ListTribeChangesResp
type ListTribeSnapshotsResp ¶ added in v0.10.0
type ListTribeSnapshotsResp struct { Data []TribeSnapshot `json:"data"` } // @name ListTribeSnapshotsResp
func NewListTribeSnapshotsResp ¶ added in v0.10.0
func NewListTribeSnapshotsResp(snapshots []domain.TribeSnapshot) ListTribeSnapshotsResp
type ListTribesResp ¶
type ListTribesResp struct { Data []Tribe `json:"data"` } // @name ListTribesResp
func NewListTribesResp ¶
func NewListTribesResp(tribes []domain.Tribe) ListTribesResp
type ListVersionsResp ¶
type ListVersionsResp struct { Data []Version `json:"data"` } // @name ListVersionsResp
func NewListVersionsResp ¶
func NewListVersionsResp(versions []domain.Version) ListVersionsResp
type ListVillagesResp ¶
type ListVillagesResp struct { Data []Village `json:"data"` } // @name ListVillagesResp
func NewListVillagesResp ¶
func NewListVillagesResp(villages []domain.VillageWithRelations) ListVillagesResp
type NullPlayerMeta ¶
type NullPlayerMeta struct { Player PlayerMeta Valid bool }
func (NullPlayerMeta) MarshalJSON ¶
func (p NullPlayerMeta) MarshalJSON() ([]byte, error)
func (*NullPlayerMeta) UnmarshalJSON ¶
func (p *NullPlayerMeta) UnmarshalJSON(data []byte) error
type NullTribeMeta ¶
func (NullTribeMeta) MarshalJSON ¶
func (t NullTribeMeta) MarshalJSON() ([]byte, error)
func (*NullTribeMeta) UnmarshalJSON ¶
func (t *NullTribeMeta) UnmarshalJSON(data []byte) error
type Player ¶
type Player struct { ID int64 `json:"id"` Name string `json:"name"` NumVillages int64 `json:"numVillages"` Points int64 `json:"points"` Rank int64 `json:"rank"` Tribe NullTribeMeta `json:"tribe" extensions:"x-nullable"` RankAtt int64 `json:"rankAtt"` ScoreAtt int64 `json:"scoreAtt"` RankDef int64 `json:"rankDef"` ScoreDef int64 `json:"scoreDef"` RankSup int64 `json:"rankSup"` ScoreSup int64 `json:"scoreSup"` RankTotal int64 `json:"rankTotal"` ScoreTotal int64 `json:"scoreTotal"` ProfileURL string `json:"profileUrl"` BestRank int64 `json:"bestRank"` BestRankAt time.Time `json:"bestRankAt" format:"date-time"` MostPoints int64 `json:"mostPoints"` MostPointsAt time.Time `json:"mostPointsAt" format:"date-time"` MostVillages int64 `json:"mostVillages"` MostVillagesAt time.Time `json:"mostVillagesAt" format:"date-time"` LastActivityAt time.Time `json:"lastActivityAt" format:"date-time"` CreatedAt time.Time `json:"createdAt" format:"date-time"` DeletedAt NullTime `json:"deletedAt" swaggertype:"string" format:"date-time" extensions:"x-nullable"` } // @name Player
func NewPlayer ¶
func NewPlayer(p domain.PlayerWithRelations) Player
type PlayerMeta ¶
type PlayerMeta struct { ID int64 `json:"id"` Name string `json:"name"` ProfileURL string `json:"profileUrl"` Tribe NullTribeMeta `json:"tribe" extensions:"x-nullable"` } // @name PlayerMeta
PlayerMeta represents basic player information @Description Basic player information
func NewPlayerMeta ¶
func NewPlayerMeta(p domain.PlayerMetaWithRelations) PlayerMeta
type PlayerSnapshot ¶ added in v0.7.0
type PlayerSnapshot struct { ID int64 `json:"id"` NumVillages int64 `json:"numVillages"` Points int64 `json:"points"` Rank int64 `json:"rank"` Tribe NullTribeMeta `json:"tribe" extensions:"x-nullable"` RankAtt int64 `json:"rankAtt"` ScoreAtt int64 `json:"scoreAtt"` RankDef int64 `json:"rankDef"` ScoreDef int64 `json:"scoreDef"` RankSup int64 `json:"rankSup"` ScoreSup int64 `json:"scoreSup"` RankTotal int64 `json:"rankTotal"` ScoreTotal int64 `json:"scoreTotal"` Date Date `json:"date" swaggertype:"string" format:"date"` } // @name PlayerSnapshot
func NewPlayerSnapshot ¶ added in v0.7.0
func NewPlayerSnapshot(s domain.PlayerSnapshotWithRelations) PlayerSnapshot
type PlayerWithServer ¶ added in v0.8.3
type PlayerWithServer struct { Player Server ServerMeta `json:"server"` } // @name PlayerWithServer
func NewPlayerWithServer ¶ added in v0.8.3
func NewPlayerWithServer(p domain.PlayerWithRelations) PlayerWithServer
type Server ¶
type Server struct { Key string `json:"key" example:"pl151"` URL string `json:"url" example:"https://pl151.plemiona.pl"` Open bool `json:"open"` NumPlayers int64 `json:"numPlayers"` NumTribes int64 `json:"numTribes"` NumVillages int64 `json:"numVillages"` NumPlayerVillages int64 `json:"numPlayerVillages"` NumBarbarianVillages int64 `json:"numBarbarianVillages"` NumBonusVillages int64 `json:"numBonusVillages"` CreatedAt time.Time `json:"createdAt" format:"date-time"` PlayerDataUpdatedAt NullTime `json:"playerDataUpdatedAt" swaggertype:"string" format:"date-time" extensions:"x-nullable"` TribeDataUpdatedAt NullTime `json:"tribeDataUpdatedAt" swaggertype:"string" format:"date-time" extensions:"x-nullable"` VillageDataUpdatedAt NullTime `json:"villageDataUpdatedAt" swaggertype:"string" format:"date-time" extensions:"x-nullable"` EnnoblementDataUpdatedAt NullTime `json:"ennoblementDataUpdatedAt" swaggertype:"string" format:"date-time" extensions:"x-nullable"` } // @name Server
type ServerConfig ¶
type ServerConfig struct { Speed float64 `json:"speed"` UnitSpeed float64 `json:"unitSpeed"` Moral int16 `json:"moral"` Build ServerConfigBuild `json:"build"` Misc ServerConfigMisc `json:"misc"` Commands ServerConfigCommands `json:"commands"` Newbie ServerConfigNewbie `json:"newbie"` Game ServerConfigGame `json:"game"` Buildings ServerConfigBuildings `json:"buildings"` Snob ServerConfigSnob `json:"snob"` Ally ServerConfigAlly `json:"ally"` Coord ServerConfigCoord `json:"coord"` Sitter ServerConfigSitter `json:"sitter"` Sleep ServerConfigSleep `json:"sleep"` Night ServerConfigNight `json:"night"` Win ServerConfigWin `json:"win"` } // @name ServerConfig
func NewServerConfig ¶
func NewServerConfig(cfg domain.ServerConfig) ServerConfig
type ServerConfigAlly ¶
type ServerConfigAlly struct { NoHarm int8 `json:"noHarm"` NoOtherSupport int8 `json:"noOtherSupport"` NoOtherSupportType int8 `json:"noOtherSupportType"` AllytimeSupport int32 `json:"allytimeSupport"` NoLeave int8 `json:"noLeave"` NoJoin int8 `json:"noJoin"` Limit int16 `json:"limit"` FixedAllies int8 `json:"fixedAllies"` PointsMemberCount int32 `json:"pointsMemberCount"` WarsMemberRequirement int16 `json:"warsMemberRequirement"` WarsPointsRequirement int32 `json:"warsPointsRequirement"` WarsAutoacceptDays int16 `json:"warsAutoacceptDays"` Levels int8 `json:"levels"` XpRequirements string `json:"xpRequirements"` } // @name ServerConfigAlly
type ServerConfigBuild ¶
type ServerConfigBuild struct { Destroy int8 `json:"destroy"` } // @name ServerConfigBuild
type ServerConfigBuildings ¶
type ServerConfigBuildings struct { CustomMain int8 `json:"customMain"` CustomFarm int8 `json:"customFarm"` CustomStorage int8 `json:"customStorage"` CustomPlace int8 `json:"customPlace"` CustomBarracks int8 `json:"customBarracks"` CustomChurch int8 `json:"customChurch"` CustomSmith int8 `json:"customSmith"` CustomWood int8 `json:"customWood"` CustomStone int8 `json:"customStone"` CustomIron int8 `json:"customIron"` CustomMarket int8 `json:"customMarket"` CustomStable int8 `json:"customStable"` CustomWall int8 `json:"customWall"` CustomGarage int8 `json:"customGarage"` CustomHide int8 `json:"customHide"` CustomSnob int8 `json:"customSnob"` CustomStatue int8 `json:"customStatue"` CustomWatchtower int8 `json:"customWatchtower"` } // @name ServerConfigBuildings
type ServerConfigCommands ¶
type ServerConfigCoord ¶
type ServerConfigCoord struct { MapSize int16 `json:"mapSize"` Func int8 `json:"func"` EmptyVillages int16 `json:"emptyVillages"` BonusVillages int16 `json:"bonusVillages"` BonusNew int16 `json:"bonusNew"` Inner int32 `json:"inner"` SelectStart int8 `json:"selectStart"` VillageMoveWait int32 `json:"villageMoveWait"` NobleRestart int8 `json:"nobleRestart"` StartVillages int8 `json:"startVillages"` } // @name ServerConfigCoord
type ServerConfigGame ¶
type ServerConfigGame struct { BuildtimeFormula int8 `json:"buildtimeFormula"` Knight int8 `json:"knight"` KnightNewItems int8 `json:"knightNewItems"` Archer int8 `json:"archer"` Tech int8 `json:"tech"` FarmLimit int32 `json:"farmLimit"` Church int8 `json:"church"` Watchtower int8 `json:"watchtower"` Stronghold int8 `json:"stronghold"` FakeLimit float64 `json:"fakeLimit"` BarbarianRise float64 `json:"barbarianRise"` BarbarianShrink int8 `json:"barbarianShrink"` BarbarianMaxPoints int32 `json:"barbarianMaxPoints"` Scavenging int8 `json:"scavenging"` Hauls int8 `json:"hauls"` HaulsBase int32 `json:"haulsBase"` HaulsMax int32 `json:"haulsMax"` BaseProduction int32 `json:"baseProduction"` Event int16 `json:"event"` SuppressEvents int8 `json:"suppressEvents"` } // @name ServerConfigGame
type ServerConfigMisc ¶
type ServerConfigNewbie ¶
type ServerConfigNight ¶
type ServerConfigSitter ¶
type ServerConfigSitter struct { Allow int8 `json:"allow"` } // @name ServerConfigSitter
type ServerConfigSleep ¶
type ServerConfigSnob ¶
type ServerConfigSnob struct { Gold int8 `json:"gold"` CheapRebuild int8 `json:"cheapRebuild"` Rise int8 `json:"rise"` MaxDist int16 `json:"maxDist"` Factor float64 `json:"factor"` CoinWood int32 `json:"coinWood"` CoinStone int32 `json:"coinStone"` CoinIron int32 `json:"coinIron"` NoBarbConquer int8 `json:"noBarbConquer"` } // @name ServerConfigSnob
type ServerConfigWin ¶
type ServerConfigWin struct { Check int16 `json:"check"` } // @name ServerConfigWin
type ServerMeta ¶ added in v0.8.3
type ServerMeta struct { Key string `json:"key" example:"pl151"` URL string `json:"url" example:"https://pl151.plemiona.pl"` Open bool `json:"open"` } // @name ServerMeta
ServerMeta represents basic server information @Description Basic server information
func NewServerMeta ¶ added in v0.8.3
func NewServerMeta(s domain.ServerMeta) ServerMeta
type Tribe ¶
type Tribe struct { ID int64 `json:"id"` Name string `json:"name"` Tag string `json:"tag"` NumMembers int64 `json:"numMembers"` NumVillages int64 `json:"numVillages"` Points int64 `json:"points"` AllPoints int64 `json:"allPoints"` Rank int64 `json:"rank"` Dominance float64 `json:"dominance"` RankAtt int64 `json:"rankAtt"` ScoreAtt int64 `json:"scoreAtt"` RankDef int64 `json:"rankDef"` ScoreDef int64 `json:"scoreDef"` RankTotal int64 `json:"rankTotal"` ScoreTotal int64 `json:"scoreTotal"` ProfileURL string `json:"profileUrl"` BestRank int64 `json:"bestRank"` BestRankAt time.Time `json:"bestRankAt" format:"date-time"` MostPoints int64 `json:"mostPoints"` MostPointsAt time.Time `json:"mostPointsAt" format:"date-time"` MostVillages int64 `json:"mostVillages"` MostVillagesAt time.Time `json:"mostVillagesAt" format:"date-time"` CreatedAt time.Time `json:"createdAt" format:"date-time"` DeletedAt NullTime `json:"deletedAt" swaggertype:"string" format:"date-time" extensions:"x-nullable"` } // @name Tribe
type TribeChange ¶ added in v0.7.5
type TribeChange struct { ID int64 `json:"id"` Player PlayerMeta `json:"player"` NewTribe NullTribeMeta `json:"newTribe"` CreatedAt time.Time `json:"createdAt" format:"date-time"` } // @name TribeChange
func NewTribeChange ¶ added in v0.7.5
func NewTribeChange(tc domain.TribeChangeWithRelations) TribeChange
type TribeMeta ¶
type TribeMeta struct { ID int64 `json:"id"` Name string `json:"name"` Tag string `json:"tag"` ProfileURL string `json:"profileUrl"` } // @name TribeMeta
TribeMeta represents basic tribe information @Description Basic tribe information
func NewTribeMeta ¶
type TribeSnapshot ¶ added in v0.10.0
type TribeSnapshot struct { ID int64 `json:"id"` NumMembers int64 `json:"numMembers"` NumVillages int64 `json:"numVillages"` Points int64 `json:"points"` AllPoints int64 `json:"allPoints"` Rank int64 `json:"rank"` Dominance float64 `json:"dominance"` RankAtt int64 `json:"rankAtt"` ScoreAtt int64 `json:"scoreAtt"` RankDef int64 `json:"rankDef"` ScoreDef int64 `json:"scoreDef"` RankTotal int64 `json:"rankTotal"` ScoreTotal int64 `json:"scoreTotal"` Date Date `json:"date" swaggertype:"string" format:"date"` } // @name TribeSnapshot
func NewTribeSnapshot ¶ added in v0.10.0
func NewTribeSnapshot(s domain.TribeSnapshot) TribeSnapshot
type UnitInfo ¶
type UnitInfo struct { Spear Unit `json:"spear"` Sword Unit `json:"sword"` Axe Unit `json:"axe"` Archer Unit `json:"archer"` Spy Unit `json:"spy"` Light Unit `json:"light"` Marcher Unit `json:"marcher"` Heavy Unit `json:"heavy"` Ram Unit `json:"ram"` Catapult Unit `json:"catapult"` Knight Unit `json:"knight"` Snob Unit `json:"snob"` Militia Unit `json:"militia"` } // @name UnitInfo
func NewUnitInfo ¶
type Version ¶
type Version struct { Code string `json:"code" example:"pl"` Name string `json:"name" example:"Poland"` Host string `json:"host" example:"plemiona.pl"` Timezone string `json:"timezone" example:"Europe/Warsaw"` } // @name Version
func NewVersion ¶
type Village ¶
type Village struct { ID int64 `json:"id"` Name string `json:"name" example:"Village"` FullName string `json:"fullName" example:"Village (450|450) K44"` Points int64 `json:"points"` X int64 `json:"x" example:"450"` Y int64 `json:"y" example:"450"` Continent string `json:"continent" example:"K44"` Bonus int64 `json:"bonus"` Player NullPlayerMeta `json:"player" extensions:"x-nullable"` ProfileURL string `json:"profileUrl"` CreatedAt time.Time `json:"createdAt" format:"date-time"` } // @name Village
func NewVillage ¶
func NewVillage(v domain.VillageWithRelations) Village
type VillageMeta ¶
type VillageMeta struct { ID int64 `json:"id"` FullName string `json:"fullName" example:"Village (450|450) K44"` X int64 `json:"x"` Y int64 `json:"y"` Player NullPlayerMeta `json:"player" extensions:"x-nullable"` Continent string `json:"continent"` ProfileURL string `json:"profileUrl"` } // @name VillageMeta
VillageMeta represents basic village information @Description Basic village information
func NewVillageMeta ¶
func NewVillageMeta(v domain.VillageMetaWithRelations) VillageMeta
Click to show internal directories.
Click to hide internal directories.