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 Error
- type ErrorCode
- type ListEnnoblementsParams
- type ListPlayerSnapshotsParams
- type ListPlayersParams
- type ListServersParams
- type ListTribeChangesParams
- type ListTribeSnapshotsParams
- type ListTribesParams
- 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 OpponentsDefeated
- type Pagination
- type Player
- type PlayerMeta
- type PlayerMetaWithRelations
- type PlayerNotFoundError
- type PlayerSnapshot
- type PlayerSnapshotSort
- type PlayerSnapshotSortBy
- type PlayerSnapshotWithRelations
- 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 ServerMeta
- type ServerNotFoundError
- type SliceValidationError
- type SortDirection
- type Tribe
- type TribeChange
- type TribeChangeSort
- type TribeChangeSortBy
- type TribeChangeWithRelations
- type TribeMeta
- type TribeNotFoundError
- type TribeSnapshot
- type TribeSnapshotSort
- type TribeSnapshotSortBy
- type TribeSort
- type TribeSortBy
- type Unit
- type UnitInfo
- type UpdateServerParams
- type ValidationError
- type Version
- type VersionNotFoundError
- type Village
- type VillageMeta
- type VillageMetaWithRelations
- type VillageNotFoundError
- type VillageWithRelations
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNothingToUpdate = errors.New("nothing to update") ErrUnsupportedSortBy = errors.New("unsupported sort by") )
View Source
var (
ErrUnsupportedSortDirection = errors.New("unsupported sort direction")
)
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 }
func NewEnnoblementSort ¶ added in v0.7.5
func NewEnnoblementSort(by, dir string) (EnnoblementSort, error)
type EnnoblementSortBy ¶
type EnnoblementSortBy uint8
const (
EnnoblementSortByCreatedAt EnnoblementSortBy = iota
)
type EnnoblementWithRelations ¶ added in v0.2.0
type EnnoblementWithRelations struct { Ennoblement Village VillageMeta NewOwner NullPlayerMeta NewTribe NullTribeMeta OldOwner NullPlayerMeta OldTribe NullTribeMeta }
type ListEnnoblementsParams ¶
type ListEnnoblementsParams struct { ServerKeys []string CreatedAtGTE NullTime CreatedAtLTE NullTime // PlayerID filters out ennoblements whose NewOwnerID OR OldOwnerID isn't equal to the provided value. PlayerID int64 // TribeID filters out ennoblements whose NewTribeID OR OldTribeID isn't equal to the provided value. TribeID int64 VillageID int64 Pagination Pagination Sort []EnnoblementSort }
type ListPlayerSnapshotsParams ¶ added in v0.6.0
type ListPlayerSnapshotsParams struct { ServerKeys []string PlayerIDs []int64 Pagination Pagination Sort []PlayerSnapshotSort }
type ListPlayersParams ¶
type ListPlayersParams struct { IDs []int64 IDGT NullInt64 ServerKeys []string ServerKeysNIN []string VersionCodes []string Deleted NullBool TribeID int64 Pagination Pagination Sort []PlayerSort }
type ListServersParams ¶
type ListTribeChangesParams ¶ added in v0.7.5
type ListTribeChangesParams struct { ServerKeys []string PlayerIDs []int64 // TribeIDs filters out tribe changes whose NewTribeID OR OldTribeID isn't in the provided slice. TribeIDs []int64 Pagination Pagination Sort []TribeChangeSort }
type ListTribeSnapshotsParams ¶ added in v0.6.0
type ListTribeSnapshotsParams struct { ServerKeys []string TribeIDs []int64 Pagination Pagination Sort []TribeSnapshotSort }
type ListTribesParams ¶
type ListVillagesParams ¶
type ListVillagesParams struct { IDs []int64 ServerKeys []string Pagination Pagination }
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 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 PlayerSnapshotSort ¶ added in v0.7.0
type PlayerSnapshotSort struct { By PlayerSnapshotSortBy Direction SortDirection }
func NewPlayerSnapshotSort ¶ added in v0.7.5
func NewPlayerSnapshotSort(by, dir string) (PlayerSnapshotSort, error)
type PlayerSnapshotSortBy ¶ added in v0.7.0
type PlayerSnapshotSortBy uint8
const ( PlayerSnapshotSortByID PlayerSnapshotSortBy = iota PlayerSnapshotSortByDate )
type PlayerSnapshotWithRelations ¶ added in v0.7.0
type PlayerSnapshotWithRelations struct { PlayerSnapshot Tribe NullTribeMeta }
type PlayerSort ¶
type PlayerSort struct { By PlayerSortBy Direction SortDirection }
func NewPlayerSort ¶ added in v0.7.5
func NewPlayerSort(by, dir string) (PlayerSort, error)
type PlayerSortBy ¶
type PlayerSortBy uint8
const ( PlayerSortByID PlayerSortBy = iota PlayerSortByScoreAtt PlayerSortByScoreDef PlayerSortByScoreSup PlayerSortByScoreTotal PlayerSortByPoints PlayerSortByDeletedAt )
type PlayerWithRelations ¶ added in v0.2.0
type PlayerWithRelations struct { Player Tribe NullTribeMeta Server ServerMeta }
type RefreshVillagesResult ¶
type Server ¶
type Server struct { Key string URL string Open bool Special bool NumPlayers int64 NumTribes int64 NumVillages int64 NumPlayerVillages int64 NumBarbarianVillages int64 NumBonusVillages 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 EnnoblementDataUpdatedAt 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 Scavenging int8 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 ServerMeta ¶ added in v0.8.3
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 SliceValidationError ¶ added in v0.11.1
func (SliceValidationError) Code ¶ added in v0.11.1
func (e SliceValidationError) Code() ErrorCode
func (SliceValidationError) Error ¶ added in v0.11.1
func (e SliceValidationError) Error() string
func (SliceValidationError) Unwrap ¶ added in v0.11.1
func (e SliceValidationError) Unwrap() error
func (SliceValidationError) UserError ¶ added in v0.11.1
func (e SliceValidationError) UserError() string
type SortDirection ¶
type SortDirection uint8
const ( SortDirectionASC SortDirection = iota SortDirectionDESC )
type Tribe ¶
type Tribe struct { OpponentsDefeated ID int64 Name string Tag string NumMembers int64 NumVillages int64 Points int64 // points of top x players 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 TribeChangeSort ¶ added in v0.7.5
type TribeChangeSort struct { By TribeChangeSortBy Direction SortDirection }
func NewTribeChangeSort ¶ added in v0.7.5
func NewTribeChangeSort(by, dir string) (TribeChangeSort, error)
type TribeChangeSortBy ¶ added in v0.7.5
type TribeChangeSortBy uint8
const ( TribeChangeSortByID TribeChangeSortBy = iota TribeChangeSortByCreatedAt )
type TribeChangeWithRelations ¶ added in v0.7.5
type TribeChangeWithRelations struct { TribeChange Player PlayerMeta NewTribe NullTribeMeta OldTribe NullTribeMeta }
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 TribeSnapshotSort ¶ added in v0.10.0
type TribeSnapshotSort struct { By TribeSnapshotSortBy Direction SortDirection }
func NewTribeSnapshotSort ¶ added in v0.10.0
func NewTribeSnapshotSort(by, dir string) (TribeSnapshotSort, error)
type TribeSnapshotSortBy ¶ added in v0.10.0
type TribeSnapshotSortBy uint8
const ( TribeSnapshotSortByID TribeSnapshotSortBy = iota TribeSnapshotSortByDate )
type TribeSort ¶
type TribeSort struct { By TribeSortBy Direction SortDirection }
func NewTribeSort ¶ added in v0.7.5
type TribeSortBy ¶
type TribeSortBy uint8
const ( TribeSortByID TribeSortBy = iota TribeSortByScoreAtt TribeSortByScoreDef TribeSortByScoreTotal TribeSortByPoints TribeSortByDominance TribeSortByDeletedAt )
type UpdateServerParams ¶
type UpdateServerParams struct { Config NullServerConfig BuildingInfo NullBuildingInfo UnitInfo NullUnitInfo NumPlayers NullInt64 PlayerDataUpdatedAt time.Time PlayerSnapshotsCreatedAt time.Time NumTribes NullInt64 TribeDataUpdatedAt time.Time TribeSnapshotsCreatedAt time.Time NumVillages NullInt64 NumPlayerVillages NullInt64 NumBarbarianVillages NullInt64 NumBonusVillages NullInt64 VillageDataUpdatedAt time.Time EnnoblementDataUpdatedAt 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 VillageMetaWithRelations ¶ added in v0.8.0
type VillageMetaWithRelations struct { VillageMeta Player NullPlayerMetaWithRelations }
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.