Documentation ¶
Index ¶
- Variables
- type BaseEnnoblement
- type BasePlayer
- type BaseTribe
- type BaseVillage
- type Building
- type BuildingInfo
- type CreateEnnoblementParams
- type CreatePlayerParams
- type CreateServerParams
- type CreateTribeParams
- type CreateVillageParams
- type Ennoblement
- type EnnoblementSort
- type EnnoblementSortBy
- 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 NullPlayer
- type NullServerConfig
- type NullTime
- type NullTribe
- type NullUnitInfo
- type NullVillage
- type OpenServer
- type OpponentsDefeated
- type Pagination
- type Player
- type PlayerNotFoundError
- type PlayerSort
- type PlayerSortBy
- 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 TribeNotFoundError
- type TribeSort
- type TribeSortBy
- type Unit
- type UnitInfo
- type UpdateServerParams
- type UserError
- type ValidationError
- type Version
- type VersionNotFoundError
- type Village
- type VillageNotFoundError
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BaseEnnoblement ¶
type BasePlayer ¶
type BaseVillage ¶
type BuildingInfo ¶
type CreateEnnoblementParams ¶
type CreateEnnoblementParams struct { BaseEnnoblement ServerKey string }
type CreatePlayerParams ¶
type CreatePlayerParams struct { BasePlayer ServerKey string }
type CreateServerParams ¶
type CreateTribeParams ¶
type CreateVillageParams ¶
type CreateVillageParams struct { BaseVillage ServerKey string }
type Ennoblement ¶
type Ennoblement struct { BaseEnnoblement ID int64 Village NullVillage NewOwner NullPlayer NewTribe NullTribe OldOwner NullPlayer OldTribe NullTribe ServerKey string }
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 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 NullPlayer ¶
type NullServerConfig ¶
type NullServerConfig struct { Config ServerConfig Valid bool // Valid is true if Config is not NULL }
type NullUnitInfo ¶
type NullVillage ¶
type OpenServer ¶
type OpponentsDefeated ¶
type Pagination ¶
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 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 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 TribeDataUpdatedAt 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 TribeNotFoundError ¶
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 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 }
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 Village struct { BaseVillage ServerKey string Player NullPlayer // only available when ListVillagesParams.IncludePlayer == true CreatedAt time.Time }
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
Click to show internal directories.
Click to hide internal directories.