Documentation ¶
Index ¶
- Variables
- type Building
- type BuildingInfo
- type CreateEnnoblementParams
- type CreatePlayerParams
- type CreatePlayerSnapshotParams
- type CreateServerParams
- type CreateSnapshotsCmdPayload
- type CreateTribeChangeParams
- type CreateTribeParams
- type CreateTribeSnapshotParams
- type CreateVillageParams
- type Ennoblement
- type EnnoblementSort
- type EnnoblementSortBy
- type EnnoblementWithRelations
- type ErrorCode
- type ListEnnoblementsParams
- type ListPlayersParams
- type ListServersParams
- type ListTribesParams
- type ListVersionsParams
- type ListVillagesParams
- type MaxError
- type MaxLengthError
- type MinError
- type NullBool
- type NullBuildingInfo
- type NullInt32
- type NullInt64
- type NullPlayerMeta
- type NullPlayerMetaWithRelations
- type NullServerConfig
- type NullTime
- type NullTribeMeta
- type NullUnitInfo
- type NullVillageMeta
- type OpponentsDefeated
- type Pagination
- type Player
- type PlayerMeta
- type PlayerMetaWithRelations
- type PlayerNotFoundError
- type PlayerSnapshot
- type PlayerSort
- type PlayerSortBy
- type PlayerWithRelations
- type RefreshEnnoblementsCmdPayload
- type RefreshServersCmdPayload
- type RefreshVillagesResult
- 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 ServerNotFoundError
- type SortDirection
- type Tribe
- type TribeChange
- type TribeMeta
- type TribeNotFoundError
- type TribeSnapshot
- type TribeSort
- type TribeSortBy
- type Unit
- type UnitInfo
- type UpdateServerParams
- type UserError
- type ValidationError
- type Version
- type VersionNotFoundError
- type Village
- type VillageMeta
- type VillageNotFoundError
- type VillageWithRelations
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BuildingInfo ¶
type CreateEnnoblementParams ¶
type CreatePlayerParams ¶
type CreatePlayerParams struct { OpponentsDefeated ID int64 Name string NumVillages int64 Points int64 Rank int64 TribeID int64 ProfileURL string BestRank int64 BestRankAt time.Time MostPoints int64 MostPointsAt time.Time MostVillages int64 MostVillagesAt time.Time LastActivityAt time.Time ServerKey string }
type CreatePlayerSnapshotParams ¶ added in v0.3.0
type CreateServerParams ¶
type CreateSnapshotsCmdPayload ¶ added in v0.3.0
type CreateTribeChangeParams ¶ added in v0.4.0
type CreateTribeParams ¶
type CreateTribeParams struct { OpponentsDefeated ID int64 Name string Tag string NumMembers int64 NumVillages int64 Points int64 AllPoints int64 Rank int64 ProfileURL string BestRank int64 BestRankAt time.Time MostPoints int64 MostPointsAt time.Time MostVillages int64 MostVillagesAt time.Time ServerKey string }
type CreateTribeSnapshotParams ¶ added in v0.3.0
type CreateVillageParams ¶
type Ennoblement ¶
type EnnoblementSort ¶
type EnnoblementSort struct { By EnnoblementSortBy Direction SortDirection }
type EnnoblementSortBy ¶
type EnnoblementSortBy uint8
const ( EnnoblementSortByID EnnoblementSortBy = iota EnnoblementSortByCreatedAt )
func NewEnnoblementSortBy ¶
func NewEnnoblementSortBy(s string) (EnnoblementSortBy, error)
type EnnoblementWithRelations ¶ added in v0.2.0
type EnnoblementWithRelations struct { Ennoblement Village NullVillageMeta NewOwner NullPlayerMeta NewTribe NullTribeMeta OldOwner NullPlayerMeta OldTribe NullTribeMeta }
type ListEnnoblementsParams ¶
type ListPlayersParams ¶
type ListPlayersParams struct { IDs []int64 IDGT NullInt64 ServerKeys []string Deleted NullBool IncludeTribe bool Pagination Pagination Sort []PlayerSort Count bool }
type ListServersParams ¶
type ListTribesParams ¶
type ListVersionsParams ¶
type ListVersionsParams struct {
Count bool
}
type ListVillagesParams ¶
type ListVillagesParams struct { IDs []int64 ServerKeys []string IncludePlayer bool // IncludePlayer doesn't include tribe player is in. Check IncludePlayerTribe for that. IncludePlayerTribe bool // IncludePlayerTribe also automatically includes player, even if IncludePlayer == false. Pagination Pagination Count bool }
type MaxLengthError ¶
type MaxLengthError struct {
Max int
}
func (MaxLengthError) Code ¶
func (e MaxLengthError) Code() ErrorCode
func (MaxLengthError) Error ¶
func (e MaxLengthError) Error() string
func (MaxLengthError) UserError ¶
func (e MaxLengthError) UserError() string
type NullBuildingInfo ¶
type NullBuildingInfo struct { Info BuildingInfo Valid bool // Valid is true if Info is not NULL }
type NullPlayerMeta ¶ added in v0.2.0
type NullPlayerMeta struct { Valid bool Player PlayerMeta }
type NullPlayerMetaWithRelations ¶ added in v0.2.0
type NullPlayerMetaWithRelations struct { Valid bool Player PlayerMetaWithRelations }
type NullServerConfig ¶
type NullServerConfig struct { Config ServerConfig Valid bool // Valid is true if Config is not NULL }
type NullTribeMeta ¶ added in v0.2.0
type NullUnitInfo ¶
type NullVillageMeta ¶ added in v0.2.0
type NullVillageMeta struct { Valid bool Village VillageMeta }
type OpponentsDefeated ¶
type Pagination ¶
type Player ¶
type Player struct { OpponentsDefeated ID int64 Name string NumVillages int64 Points int64 Rank int64 TribeID int64 ProfileURL string BestRank int64 BestRankAt time.Time MostPoints int64 MostPointsAt time.Time MostVillages int64 MostVillagesAt time.Time LastActivityAt time.Time ServerKey string CreatedAt time.Time DeletedAt time.Time }
type PlayerMeta ¶ added in v0.2.0
type PlayerMetaWithRelations ¶ added in v0.2.0
type PlayerMetaWithRelations struct { PlayerMeta Tribe NullTribeMeta }
type PlayerNotFoundError ¶
type PlayerNotFoundError struct {
ID int64
}
func (PlayerNotFoundError) Code ¶
func (e PlayerNotFoundError) Code() ErrorCode
func (PlayerNotFoundError) Error ¶
func (e PlayerNotFoundError) Error() string
func (PlayerNotFoundError) UserError ¶
func (e PlayerNotFoundError) UserError() string
type PlayerSnapshot ¶ added in v0.3.0
type PlayerSort ¶
type PlayerSort struct { By PlayerSortBy Direction SortDirection }
type PlayerSortBy ¶
type PlayerSortBy uint8
const ( PlayerSortByID PlayerSortBy = iota PlayerSortByScoreAtt PlayerSortByScoreDef PlayerSortByScoreSup PlayerSortByScoreTotal PlayerSortByPoints PlayerSortByDeletedAt )
func NewPlayerSortBy ¶
func NewPlayerSortBy(s string) (PlayerSortBy, error)
type PlayerWithRelations ¶ added in v0.2.0
type PlayerWithRelations struct { Player Tribe NullTribeMeta }
type RefreshVillagesResult ¶
type Server ¶
type Server struct { Key string URL string Open bool Special bool NumPlayers int64 NumTribes int64 NumVillages int64 Config ServerConfig BuildingInfo BuildingInfo UnitInfo UnitInfo CreatedAt time.Time PlayerDataUpdatedAt time.Time PlayerSnapshotsCreatedAt time.Time TribeDataUpdatedAt time.Time TribeSnapshotsCreatedAt time.Time VillageDataUpdatedAt time.Time VersionCode string }
type ServerConfig ¶
type ServerConfig struct { Speed float64 UnitSpeed float64 Moral int16 Build ServerConfigBuild Misc ServerConfigMisc Commands ServerConfigCommands Newbie ServerConfigNewbie Game ServerConfigGame Buildings ServerConfigBuildings Snob ServerConfigSnob Ally ServerConfigAlly Coord ServerConfigCoord Sitter ServerConfigSitter Sleep ServerConfigSleep Night ServerConfigNight Win ServerConfigWin }
type ServerConfigAlly ¶
type ServerConfigAlly struct { NoHarm int8 NoOtherSupport int8 NoOtherSupportType int8 AllytimeSupport int32 NoLeave int8 NoJoin int8 Limit int16 FixedAllies int8 PointsMemberCount int32 WarsMemberRequirement int16 WarsPointsRequirement int32 WarsAutoacceptDays int16 Levels int8 XpRequirements string }
type ServerConfigBuild ¶
type ServerConfigBuild struct {
Destroy int8
}
type ServerConfigBuildings ¶
type ServerConfigBuildings struct { CustomMain int8 CustomFarm int8 CustomStorage int8 CustomPlace int8 CustomBarracks int8 CustomChurch int8 CustomSmith int8 CustomWood int8 CustomStone int8 CustomIron int8 CustomMarket int8 CustomStable int8 CustomWall int8 CustomGarage int8 CustomHide int8 CustomSnob int8 CustomStatue int8 CustomWatchtower int8 }
type ServerConfigCommands ¶
type ServerConfigCoord ¶
type ServerConfigGame ¶
type ServerConfigGame struct { BuildtimeFormula int8 Knight int8 KnightNewItems int8 Archer int8 Tech int8 FarmLimit int32 Church int8 Watchtower int8 Stronghold int8 FakeLimit float64 BarbarianRise float64 BarbarianShrink int8 BarbarianMaxPoints int32 Hauls int8 HaulsBase int32 HaulsMax int32 BaseProduction int32 Event int16 SuppressEvents int8 }
type ServerConfigMisc ¶
type ServerConfigNewbie ¶
type ServerConfigNight ¶
type ServerConfigSitter ¶
type ServerConfigSitter struct {
Allow int8
}
type ServerConfigSleep ¶
type ServerConfigSnob ¶
type ServerConfigWin ¶
type ServerConfigWin struct {
Check int16
}
type ServerNotFoundError ¶
type ServerNotFoundError struct {
Key string
}
func (ServerNotFoundError) Code ¶
func (e ServerNotFoundError) Code() ErrorCode
func (ServerNotFoundError) Error ¶
func (e ServerNotFoundError) Error() string
func (ServerNotFoundError) UserError ¶
func (e ServerNotFoundError) UserError() string
type SortDirection ¶
type SortDirection uint8
const ( SortDirectionASC SortDirection = iota SortDirectionDESC )
func NewSortDirection ¶
func NewSortDirection(s string) (SortDirection, error)
type Tribe ¶
type Tribe struct { OpponentsDefeated ID int64 Name string Tag string NumMembers int64 NumVillages int64 Points int64 AllPoints int64 Rank int64 Dominance float64 ProfileURL string BestRank int64 BestRankAt time.Time MostPoints int64 MostPointsAt time.Time MostVillages int64 MostVillagesAt time.Time ServerKey string CreatedAt time.Time DeletedAt time.Time }
type TribeChange ¶ added in v0.4.0
type TribeNotFoundError ¶
type TribeNotFoundError struct {
ID int64
}
func (TribeNotFoundError) Code ¶
func (e TribeNotFoundError) Code() ErrorCode
func (TribeNotFoundError) Error ¶
func (e TribeNotFoundError) Error() string
func (TribeNotFoundError) UserError ¶
func (e TribeNotFoundError) UserError() string
type TribeSnapshot ¶ added in v0.3.0
type TribeSort ¶
type TribeSort struct { By TribeSortBy Direction SortDirection }
type TribeSortBy ¶
type TribeSortBy uint8
const ( TribeSortByID TribeSortBy = iota TribeSortByScoreAtt TribeSortByScoreDef TribeSortByScoreTotal TribeSortByPoints TribeSortByDominance TribeSortByDeletedAt )
func NewTribeSortBy ¶
func NewTribeSortBy(s string) (TribeSortBy, error)
type UpdateServerParams ¶
type UpdateServerParams struct { Config NullServerConfig BuildingInfo NullBuildingInfo UnitInfo NullUnitInfo NumPlayers NullInt64 PlayerDataUpdatedAt time.Time NumTribes NullInt64 TribeDataUpdatedAt time.Time NumVillages NullInt64 VillageDataUpdatedAt time.Time PlayerSnapshotsCreatedAt time.Time TribeSnapshotsCreatedAt time.Time }
func (UpdateServerParams) IsZero ¶
func (u UpdateServerParams) IsZero() bool
type ValidationError ¶
func (ValidationError) Code ¶
func (e ValidationError) Code() ErrorCode
func (ValidationError) Error ¶
func (e ValidationError) Error() string
func (ValidationError) Unwrap ¶
func (e ValidationError) Unwrap() error
func (ValidationError) UserError ¶
func (e ValidationError) UserError() string
type VersionNotFoundError ¶
type VersionNotFoundError struct {
VerCode string
}
func (VersionNotFoundError) Code ¶
func (e VersionNotFoundError) Code() ErrorCode
func (VersionNotFoundError) Error ¶
func (e VersionNotFoundError) Error() string
func (VersionNotFoundError) UserError ¶
func (e VersionNotFoundError) UserError() string
type Village ¶
type VillageMeta ¶ added in v0.2.0
func (VillageMeta) FullName ¶ added in v0.2.0
func (v VillageMeta) FullName() string
type VillageNotFoundError ¶
type VillageNotFoundError struct {
ID int64
}
func (VillageNotFoundError) Code ¶
func (e VillageNotFoundError) Code() ErrorCode
func (VillageNotFoundError) Error ¶
func (e VillageNotFoundError) Error() string
func (VillageNotFoundError) UserError ¶
func (e VillageNotFoundError) UserError() string
type VillageWithRelations ¶ added in v0.2.0
type VillageWithRelations struct { Village Player NullPlayerMetaWithRelations }
Click to show internal directories.
Click to hide internal directories.