Documentation ¶
Index ¶
- Constants
- Variables
- type BaseEnnoblement
- func (e BaseEnnoblement) CreatedAt() time.Time
- func (e BaseEnnoblement) IsZero() bool
- func (e BaseEnnoblement) NewOwnerID() int
- func (e BaseEnnoblement) NewTribeID() int
- func (e BaseEnnoblement) OldOwnerID() int
- func (e BaseEnnoblement) OldTribeID() int
- func (e BaseEnnoblement) Points() int
- func (e BaseEnnoblement) VillageID() int
- type BaseEnnoblements
- type BasePlayer
- func (p BasePlayer) ID() int
- func (p BasePlayer) IsZero() bool
- func (p BasePlayer) Name() string
- func (p BasePlayer) NumVillages() int
- func (p BasePlayer) OD() OpponentsDefeated
- func (p BasePlayer) Points() int
- func (p BasePlayer) ProfileURL() *url.URL
- func (p BasePlayer) Rank() int
- func (p BasePlayer) TribeID() int
- type BasePlayers
- type BaseServer
- type BaseServers
- type BaseTribe
- func (t BaseTribe) AllPoints() int
- func (t BaseTribe) ID() int
- func (t BaseTribe) IsZero() bool
- func (t BaseTribe) Name() string
- func (t BaseTribe) NumMembers() int
- func (t BaseTribe) NumVillages() int
- func (t BaseTribe) OD() OpponentsDefeated
- func (t BaseTribe) Points() int
- func (t BaseTribe) ProfileURL() *url.URL
- func (t BaseTribe) Rank() int
- func (t BaseTribe) Tag() string
- type BaseTribes
- type BaseVillage
- func (v BaseVillage) Bonus() int
- func (v BaseVillage) Continent() string
- func (v BaseVillage) ID() int
- func (v BaseVillage) IsZero() bool
- func (v BaseVillage) Name() string
- func (v BaseVillage) PlayerID() int
- func (v BaseVillage) Points() int
- func (v BaseVillage) ProfileURL() *url.URL
- func (v BaseVillage) X() int
- func (v BaseVillage) Y() int
- type BaseVillages
- type Building
- type BuildingInfo
- func (b BuildingInfo) Barracks() Building
- func (b BuildingInfo) Farm() Building
- func (b BuildingInfo) Garage() Building
- func (b BuildingInfo) Hide() Building
- func (b BuildingInfo) Iron() Building
- func (b BuildingInfo) Main() Building
- func (b BuildingInfo) Market() Building
- func (b BuildingInfo) Place() Building
- func (b BuildingInfo) Smith() Building
- func (b BuildingInfo) Snob() Building
- func (b BuildingInfo) Stable() Building
- func (b BuildingInfo) Statue() Building
- func (b BuildingInfo) Stone() Building
- func (b BuildingInfo) Storage() Building
- func (b BuildingInfo) Wall() Building
- func (b BuildingInfo) Watchtower() Building
- func (b BuildingInfo) Wood() Building
- type CleanUpDataCmdPayload
- type CleanUpDataCmdPayloadServer
- func (s CleanUpDataCmdPayloadServer) EnnoblementDataSyncedAt() time.Time
- func (s CleanUpDataCmdPayloadServer) IsZero() bool
- func (s CleanUpDataCmdPayloadServer) Key() string
- func (s CleanUpDataCmdPayloadServer) Open() bool
- func (s CleanUpDataCmdPayloadServer) PlayerDataSyncedAt() time.Time
- func (s CleanUpDataCmdPayloadServer) PlayerSnapshotsCreatedAt() time.Time
- func (s CleanUpDataCmdPayloadServer) Special() bool
- func (s CleanUpDataCmdPayloadServer) TribeDataSyncedAt() time.Time
- func (s CleanUpDataCmdPayloadServer) TribeSnapshotsCreatedAt() time.Time
- func (s CleanUpDataCmdPayloadServer) VersionCode() string
- func (s CleanUpDataCmdPayloadServer) VillageDataSyncedAt() time.Time
- type Coords
- type CountPlayersParams
- type CountTribesParams
- type CreateEnnoblementParams
- type CreatePlayerParams
- func (params CreatePlayerParams) Base() BasePlayer
- func (params CreatePlayerParams) BestRank() int
- func (params CreatePlayerParams) BestRankAt() time.Time
- func (params CreatePlayerParams) LastActivityAt() time.Time
- func (params CreatePlayerParams) MostPoints() int
- func (params CreatePlayerParams) MostPointsAt() time.Time
- func (params CreatePlayerParams) MostVillages() int
- func (params CreatePlayerParams) MostVillagesAt() time.Time
- func (params CreatePlayerParams) ServerKey() string
- type CreatePlayerSnapshotParams
- func (params CreatePlayerSnapshotParams) Date() time.Time
- func (params CreatePlayerSnapshotParams) NumVillages() int
- func (params CreatePlayerSnapshotParams) OD() OpponentsDefeated
- func (params CreatePlayerSnapshotParams) PlayerID() int
- func (params CreatePlayerSnapshotParams) Points() int
- func (params CreatePlayerSnapshotParams) Rank() int
- func (params CreatePlayerSnapshotParams) ServerKey() string
- func (params CreatePlayerSnapshotParams) TribeID() int
- type CreateServerParams
- type CreateServerSnapshotParams
- func (params CreateServerSnapshotParams) Date() time.Time
- func (params CreateServerSnapshotParams) NumActivePlayers() int
- func (params CreateServerSnapshotParams) NumActiveTribes() int
- func (params CreateServerSnapshotParams) NumBarbarianVillages() int
- func (params CreateServerSnapshotParams) NumBonusVillages() int
- func (params CreateServerSnapshotParams) NumInactivePlayers() int
- func (params CreateServerSnapshotParams) NumInactiveTribes() int
- func (params CreateServerSnapshotParams) NumPlayerVillages() int
- func (params CreateServerSnapshotParams) NumPlayers() int
- func (params CreateServerSnapshotParams) NumTribes() int
- func (params CreateServerSnapshotParams) NumVillages() int
- func (params CreateServerSnapshotParams) ServerKey() string
- type CreateSnapshotsCmdPayload
- type CreateTribeChangeParams
- type CreateTribeParams
- func (params CreateTribeParams) Base() BaseTribe
- func (params CreateTribeParams) BestRank() int
- func (params CreateTribeParams) BestRankAt() time.Time
- func (params CreateTribeParams) MostPoints() int
- func (params CreateTribeParams) MostPointsAt() time.Time
- func (params CreateTribeParams) MostVillages() int
- func (params CreateTribeParams) MostVillagesAt() time.Time
- func (params CreateTribeParams) ServerKey() string
- type CreateTribeSnapshotParams
- func (params CreateTribeSnapshotParams) AllPoints() int
- func (params CreateTribeSnapshotParams) Date() time.Time
- func (params CreateTribeSnapshotParams) Dominance() float64
- func (params CreateTribeSnapshotParams) NumMembers() int
- func (params CreateTribeSnapshotParams) NumVillages() int
- func (params CreateTribeSnapshotParams) OD() OpponentsDefeated
- func (params CreateTribeSnapshotParams) Points() int
- func (params CreateTribeSnapshotParams) Rank() int
- func (params CreateTribeSnapshotParams) ServerKey() string
- func (params CreateTribeSnapshotParams) TribeID() int
- type CreateVillageParams
- type Ennoblement
- func (e Ennoblement) Base() BaseEnnoblement
- func (e Ennoblement) CreatedAt() time.Time
- func (e Ennoblement) ID() int
- func (e Ennoblement) IsZero() bool
- func (e Ennoblement) NewOwnerID() int
- func (e Ennoblement) NewTribeID() int
- func (e Ennoblement) OldOwnerID() int
- func (e Ennoblement) OldTribeID() int
- func (e Ennoblement) Points() int
- func (e Ennoblement) ServerKey() string
- func (e Ennoblement) ToCursor() (EnnoblementCursor, error)
- func (e Ennoblement) VillageID() int
- func (e Ennoblement) WithRelations(village VillageMeta, newOwner PlayerMeta, newTribe NullTribeMeta, ...) EnnoblementWithRelations
- type EnnoblementCursor
- type EnnoblementSort
- type EnnoblementWithRelations
- func (e EnnoblementWithRelations) Ennoblement() Ennoblement
- func (e EnnoblementWithRelations) IsZero() bool
- func (e EnnoblementWithRelations) NewOwner() PlayerMeta
- func (e EnnoblementWithRelations) NewTribe() NullTribeMeta
- func (e EnnoblementWithRelations) OldOwner() NullPlayerMeta
- func (e EnnoblementWithRelations) OldTribe() NullTribeMeta
- func (e EnnoblementWithRelations) Village() VillageMeta
- type Ennoblements
- type EnnoblementsSyncedEventPayload
- type EnnoblementsWithRelations
- type Error
- type ErrorPathSegment
- type ErrorType
- type ErrorWithParams
- type ErrorWithPath
- type InvalidURLError
- type LenOutOfRangeError
- type ListEnnoblementsParams
- func (params *ListEnnoblementsParams) Before() NullTime
- func (params *ListEnnoblementsParams) Cursor() EnnoblementCursor
- func (params *ListEnnoblementsParams) Limit() int
- func (params *ListEnnoblementsParams) PlayerIDs() []int
- func (params *ListEnnoblementsParams) PrependSort(sort []EnnoblementSort) error
- func (params *ListEnnoblementsParams) PrependSortString(sort []string, allowed []EnnoblementSort, maxLength int) error
- func (params *ListEnnoblementsParams) ServerKeys() []string
- func (params *ListEnnoblementsParams) SetBefore(before NullTime) error
- func (params *ListEnnoblementsParams) SetCursor(cursor EnnoblementCursor) error
- func (params *ListEnnoblementsParams) SetEncodedCursor(encoded string) error
- func (params *ListEnnoblementsParams) SetLimit(limit int) error
- func (params *ListEnnoblementsParams) SetPlayerIDs(playerIDs []int) error
- func (params *ListEnnoblementsParams) SetServerKeys(serverKeys []string) error
- func (params *ListEnnoblementsParams) SetSince(since NullTime) error
- func (params *ListEnnoblementsParams) SetSort(sort []EnnoblementSort) error
- func (params *ListEnnoblementsParams) SetTribeIDs(tribeIDs []int) error
- func (params *ListEnnoblementsParams) SetVillageIDs(villageIDs []int) error
- func (params *ListEnnoblementsParams) Since() NullTime
- func (params *ListEnnoblementsParams) Sort() []EnnoblementSort
- func (params *ListEnnoblementsParams) TribeIDs() []int
- func (params *ListEnnoblementsParams) VillageIDs() []int
- type ListEnnoblementsResult
- type ListEnnoblementsWithRelationsResult
- type ListPlayerSnapshotsParams
- func (params *ListPlayerSnapshotsParams) Cursor() PlayerSnapshotCursor
- func (params *ListPlayerSnapshotsParams) Limit() int
- func (params *ListPlayerSnapshotsParams) PlayerIDs() []int
- func (params *ListPlayerSnapshotsParams) PrependSort(sort []PlayerSnapshotSort) error
- func (params *ListPlayerSnapshotsParams) PrependSortString(sort []string, allowed []PlayerSnapshotSort, maxLength int) error
- func (params *ListPlayerSnapshotsParams) ServerKeys() []string
- func (params *ListPlayerSnapshotsParams) SetCursor(cursor PlayerSnapshotCursor) error
- func (params *ListPlayerSnapshotsParams) SetEncodedCursor(encoded string) error
- func (params *ListPlayerSnapshotsParams) SetLimit(limit int) error
- func (params *ListPlayerSnapshotsParams) SetPlayerIDs(playerIDs []int) error
- func (params *ListPlayerSnapshotsParams) SetServerKeys(serverKeys []string) error
- func (params *ListPlayerSnapshotsParams) SetSort(sort []PlayerSnapshotSort) error
- func (params *ListPlayerSnapshotsParams) Sort() []PlayerSnapshotSort
- type ListPlayerSnapshotsResult
- type ListPlayerSnapshotsWithRelationsResult
- type ListPlayersParams
- func (params *ListPlayersParams) Cursor() PlayerCursor
- func (params *ListPlayersParams) Deleted() NullBool
- func (params *ListPlayersParams) IDs() []int
- func (params *ListPlayersParams) Limit() int
- func (params *ListPlayersParams) Names() []string
- func (params *ListPlayersParams) PrependSort(sort []PlayerSort) error
- func (params *ListPlayersParams) PrependSortString(sort []string, allowed []PlayerSort, maxLength int) error
- func (params *ListPlayersParams) Q() NullString
- func (params *ListPlayersParams) ServerKeys() []string
- func (params *ListPlayersParams) SetCursor(cursor PlayerCursor) error
- func (params *ListPlayersParams) SetDeleted(deleted NullBool) error
- func (params *ListPlayersParams) SetEncodedCursor(encoded string) error
- func (params *ListPlayersParams) SetIDs(ids []int) error
- func (params *ListPlayersParams) SetLimit(limit int) error
- func (params *ListPlayersParams) SetNames(names []string) error
- func (params *ListPlayersParams) SetQ(q NullString) error
- func (params *ListPlayersParams) SetServerKeys(serverKeys []string) error
- func (params *ListPlayersParams) SetSort(sort []PlayerSort) error
- func (params *ListPlayersParams) SetTribeIDs(tribeIDs []int) error
- func (params *ListPlayersParams) SetVersionCodes(versionCodes []string) error
- func (params *ListPlayersParams) Sort() []PlayerSort
- func (params *ListPlayersParams) TribeIDs() []int
- func (params *ListPlayersParams) VersionCodes() []string
- type ListPlayersResult
- type ListPlayersWithRelationsResult
- type ListServerSnapshotsParams
- func (params *ListServerSnapshotsParams) Cursor() ServerSnapshotCursor
- func (params *ListServerSnapshotsParams) Limit() int
- func (params *ListServerSnapshotsParams) PrependSort(sort []ServerSnapshotSort) error
- func (params *ListServerSnapshotsParams) PrependSortString(sort []string, allowed []ServerSnapshotSort, maxLength int) error
- func (params *ListServerSnapshotsParams) ServerKeys() []string
- func (params *ListServerSnapshotsParams) SetCursor(cursor ServerSnapshotCursor) error
- func (params *ListServerSnapshotsParams) SetEncodedCursor(encoded string) error
- func (params *ListServerSnapshotsParams) SetLimit(limit int) error
- func (params *ListServerSnapshotsParams) SetServerKeys(serverKeys []string) error
- func (params *ListServerSnapshotsParams) SetSort(sort []ServerSnapshotSort) error
- func (params *ListServerSnapshotsParams) Sort() []ServerSnapshotSort
- type ListServerSnapshotsResult
- type ListServerSnapshotsWithRelationsResult
- type ListServersParams
- func (params *ListServersParams) Cursor() ServerCursor
- func (params *ListServersParams) Keys() []string
- func (params *ListServersParams) Limit() int
- func (params *ListServersParams) Open() NullBool
- func (params *ListServersParams) PlayerSnapshotsCreatedAtLT() NullTime
- func (params *ListServersParams) SetCursor(cursor ServerCursor) error
- func (params *ListServersParams) SetEncodedCursor(encoded string) error
- func (params *ListServersParams) SetKeys(keys []string) error
- func (params *ListServersParams) SetLimit(limit int) error
- func (params *ListServersParams) SetOpen(open NullBool) error
- func (params *ListServersParams) SetPlayerSnapshotsCreatedAtLT(playerSnapshotsCreatedAtLT NullTime) error
- func (params *ListServersParams) SetSnapshotCreatedAtLT(snapshotCreatedAtLT NullTime) error
- func (params *ListServersParams) SetSort(sort []ServerSort) error
- func (params *ListServersParams) SetSpecial(special NullBool) error
- func (params *ListServersParams) SetTribeSnapshotsCreatedAtLT(tribeSnapshotsCreatedAtLT NullTime) error
- func (params *ListServersParams) SetVersionCodes(versionCodes []string) error
- func (params *ListServersParams) SnapshotCreatedAtLT() NullTime
- func (params *ListServersParams) Sort() []ServerSort
- func (params *ListServersParams) Special() NullBool
- func (params *ListServersParams) TribeSnapshotsCreatedAtLT() NullTime
- func (params *ListServersParams) VersionCodes() []string
- type ListServersResult
- type ListTribeChangesParams
- func (params *ListTribeChangesParams) Before() NullTime
- func (params *ListTribeChangesParams) Cursor() TribeChangeCursor
- func (params *ListTribeChangesParams) Limit() int
- func (params *ListTribeChangesParams) PlayerIDs() []int
- func (params *ListTribeChangesParams) PrependSort(sort []TribeChangeSort) error
- func (params *ListTribeChangesParams) PrependSortString(sort []string, allowed []TribeChangeSort, maxLength int) error
- func (params *ListTribeChangesParams) ServerKeys() []string
- func (params *ListTribeChangesParams) SetBefore(before NullTime) error
- func (params *ListTribeChangesParams) SetCursor(cursor TribeChangeCursor) error
- func (params *ListTribeChangesParams) SetEncodedCursor(encoded string) error
- func (params *ListTribeChangesParams) SetLimit(limit int) error
- func (params *ListTribeChangesParams) SetPlayerIDs(playerIDs []int) error
- func (params *ListTribeChangesParams) SetServerKeys(serverKeys []string) error
- func (params *ListTribeChangesParams) SetSince(since NullTime) error
- func (params *ListTribeChangesParams) SetSort(sort []TribeChangeSort) error
- func (params *ListTribeChangesParams) SetTribeIDs(tribeIDs []int) error
- func (params *ListTribeChangesParams) Since() NullTime
- func (params *ListTribeChangesParams) Sort() []TribeChangeSort
- func (params *ListTribeChangesParams) TribeIDs() []int
- type ListTribeChangesResult
- type ListTribeChangesWithRelationsResult
- type ListTribeSnapshotsParams
- func (params *ListTribeSnapshotsParams) Cursor() TribeSnapshotCursor
- func (params *ListTribeSnapshotsParams) Limit() int
- func (params *ListTribeSnapshotsParams) PrependSort(sort []TribeSnapshotSort) error
- func (params *ListTribeSnapshotsParams) PrependSortString(sort []string, allowed []TribeSnapshotSort, maxLength int) error
- func (params *ListTribeSnapshotsParams) ServerKeys() []string
- func (params *ListTribeSnapshotsParams) SetCursor(cursor TribeSnapshotCursor) error
- func (params *ListTribeSnapshotsParams) SetEncodedCursor(encoded string) error
- func (params *ListTribeSnapshotsParams) SetLimit(limit int) error
- func (params *ListTribeSnapshotsParams) SetServerKeys(serverKeys []string) error
- func (params *ListTribeSnapshotsParams) SetSort(sort []TribeSnapshotSort) error
- func (params *ListTribeSnapshotsParams) SetTribeIDs(tribeIDs []int) error
- func (params *ListTribeSnapshotsParams) Sort() []TribeSnapshotSort
- func (params *ListTribeSnapshotsParams) TribeIDs() []int
- type ListTribeSnapshotsResult
- type ListTribeSnapshotsWithRelationsResult
- type ListTribesParams
- func (params *ListTribesParams) Cursor() TribeCursor
- func (params *ListTribesParams) Deleted() NullBool
- func (params *ListTribesParams) IDs() []int
- func (params *ListTribesParams) Limit() int
- func (params *ListTribesParams) PrependSort(sort []TribeSort) error
- func (params *ListTribesParams) PrependSortString(sort []string, allowed []TribeSort, maxLength int) error
- func (params *ListTribesParams) Q() NullString
- func (params *ListTribesParams) ServerKeys() []string
- func (params *ListTribesParams) SetCursor(cursor TribeCursor) error
- func (params *ListTribesParams) SetDeleted(deleted NullBool) error
- func (params *ListTribesParams) SetEncodedCursor(encoded string) error
- func (params *ListTribesParams) SetIDs(ids []int) error
- func (params *ListTribesParams) SetLimit(limit int) error
- func (params *ListTribesParams) SetQ(q NullString) error
- func (params *ListTribesParams) SetServerKeys(serverKeys []string) error
- func (params *ListTribesParams) SetSort(sort []TribeSort) error
- func (params *ListTribesParams) SetTags(tags []string) error
- func (params *ListTribesParams) SetVersionCodes(versionCodes []string) error
- func (params *ListTribesParams) Sort() []TribeSort
- func (params *ListTribesParams) Tags() []string
- func (params *ListTribesParams) VersionCodes() []string
- type ListTribesResult
- type ListTribesWithRelationsResult
- type ListVersionsParams
- func (params *ListVersionsParams) Codes() []string
- func (params *ListVersionsParams) Cursor() VersionCursor
- func (params *ListVersionsParams) Limit() int
- func (params *ListVersionsParams) SetCodes(codes []string) error
- func (params *ListVersionsParams) SetCursor(vc VersionCursor) error
- func (params *ListVersionsParams) SetEncodedCursor(encoded string) error
- func (params *ListVersionsParams) SetLimit(limit int) error
- func (params *ListVersionsParams) SetSort(sort []VersionSort) error
- func (params *ListVersionsParams) Sort() []VersionSort
- type ListVersionsResult
- type ListVillagesParams
- func (params *ListVillagesParams) Coords() []Coords
- func (params *ListVillagesParams) Cursor() VillageCursor
- func (params *ListVillagesParams) IDs() []int
- func (params *ListVillagesParams) Limit() int
- func (params *ListVillagesParams) PlayerIDs() []int
- func (params *ListVillagesParams) ServerKeys() []string
- func (params *ListVillagesParams) SetCoords(coords []Coords) error
- func (params *ListVillagesParams) SetCoordsString(rawCoords []string) error
- func (params *ListVillagesParams) SetCursor(cursor VillageCursor) error
- func (params *ListVillagesParams) SetEncodedCursor(encoded string) error
- func (params *ListVillagesParams) SetIDs(ids []int) error
- func (params *ListVillagesParams) SetLimit(limit int) error
- func (params *ListVillagesParams) SetPlayerIDs(playerIDs []int) error
- func (params *ListVillagesParams) SetServerKeys(serverKeys []string) error
- func (params *ListVillagesParams) SetSort(sort []VillageSort) error
- func (params *ListVillagesParams) SetTribeIDs(tribeIDs []int) error
- func (params *ListVillagesParams) Sort() []VillageSort
- func (params *ListVillagesParams) TribeIDs() []int
- type ListVillagesResult
- type ListVillagesWithRelationsResult
- type MaxLessEqualError
- type MinGreaterEqualError
- type NullBool
- type NullBuildingInfo
- type NullInt
- type NullPlayerMeta
- type NullPlayerMetaWithRelations
- type NullServerConfig
- type NullString
- type NullTime
- type NullTribeMeta
- type NullUnitInfo
- type NullValue
- type OpponentsDefeated
- func (o OpponentsDefeated) RankAtt() int
- func (o OpponentsDefeated) RankDef() int
- func (o OpponentsDefeated) RankSup() int
- func (o OpponentsDefeated) RankTotal() int
- func (o OpponentsDefeated) ScoreAtt() int
- func (o OpponentsDefeated) ScoreDef() int
- func (o OpponentsDefeated) ScoreSup() int
- func (o OpponentsDefeated) ScoreTotal() int
- type Player
- func (p Player) Base() BasePlayer
- func (p Player) BestRank() int
- func (p Player) BestRankAt() time.Time
- func (p Player) CreatedAt() time.Time
- func (p Player) DeletedAt() time.Time
- func (p Player) ID() int
- func (p Player) IsDeleted() bool
- func (p Player) IsZero() bool
- func (p Player) LastActivityAt() time.Time
- func (p Player) Meta() PlayerMeta
- func (p Player) MostPoints() int
- func (p Player) MostPointsAt() time.Time
- func (p Player) MostVillages() int
- func (p Player) MostVillagesAt() time.Time
- func (p Player) Name() string
- func (p Player) NumVillages() int
- func (p Player) OD() OpponentsDefeated
- func (p Player) Points() int
- func (p Player) ProfileURL() *url.URL
- func (p Player) Rank() int
- func (p Player) ServerKey() string
- func (p Player) ToCursor() (PlayerCursor, error)
- func (p Player) TribeID() int
- func (p Player) WithRelations(server ServerMeta, tribe NullTribeMeta) PlayerWithRelations
- type PlayerCursor
- func (pc PlayerCursor) DeletedAt() time.Time
- func (pc PlayerCursor) Encode() string
- func (pc PlayerCursor) ID() int
- func (pc PlayerCursor) IsZero() bool
- func (pc PlayerCursor) MostPoints() int
- func (pc PlayerCursor) ODScoreAtt() int
- func (pc PlayerCursor) ODScoreDef() int
- func (pc PlayerCursor) ODScoreSup() int
- func (pc PlayerCursor) ODScoreTotal() int
- func (pc PlayerCursor) Points() int
- func (pc PlayerCursor) ServerKey() string
- type PlayerMeta
- type PlayerMetaWithRelations
- type PlayerNotFoundError
- type PlayerSnapshot
- func (ps PlayerSnapshot) CreatedAt() time.Time
- func (ps PlayerSnapshot) Date() time.Time
- func (ps PlayerSnapshot) ID() int
- func (ps PlayerSnapshot) IsZero() bool
- func (ps PlayerSnapshot) NumVillages() int
- func (ps PlayerSnapshot) OD() OpponentsDefeated
- func (ps PlayerSnapshot) PlayerID() int
- func (ps PlayerSnapshot) Points() int
- func (ps PlayerSnapshot) Rank() int
- func (ps PlayerSnapshot) ServerKey() string
- func (ps PlayerSnapshot) ToCursor() (PlayerSnapshotCursor, error)
- func (ps PlayerSnapshot) TribeID() int
- func (ps PlayerSnapshot) WithRelations(player PlayerMeta, tribe NullTribeMeta) PlayerSnapshotWithRelations
- type PlayerSnapshotCursor
- type PlayerSnapshotSort
- type PlayerSnapshotWithRelations
- type PlayerSnapshots
- type PlayerSnapshotsWithRelations
- type PlayerSort
- type PlayerWithRelations
- type Players
- type PlayersSyncedEventPayload
- func (p PlayersSyncedEventPayload) NumActivePlayers() int
- func (p PlayersSyncedEventPayload) NumInactivePlayers() int
- func (p PlayersSyncedEventPayload) NumPlayers() int
- func (p PlayersSyncedEventPayload) ServerKey() string
- func (p PlayersSyncedEventPayload) ServerURL() *url.URL
- func (p PlayersSyncedEventPayload) VersionCode() string
- type PlayersWithRelations
- type Server
- func (s Server) Base() BaseServer
- func (s Server) BuildingInfo() BuildingInfo
- func (s Server) Config() ServerConfig
- func (s Server) CreatedAt() time.Time
- func (s Server) EnnoblementDataSyncedAt() time.Time
- func (s Server) IsZero() bool
- func (s Server) Key() string
- func (s Server) Meta() ServerMeta
- func (s Server) NumActivePlayers() int
- func (s Server) NumActiveTribes() int
- func (s Server) NumBarbarianVillages() int
- func (s Server) NumBonusVillages() int
- func (s Server) NumInactivePlayers() int
- func (s Server) NumInactiveTribes() int
- func (s Server) NumPlayerVillages() int
- func (s Server) NumPlayers() int
- func (s Server) NumTribes() int
- func (s Server) NumVillages() int
- func (s Server) Open() bool
- func (s Server) PlayerDataSyncedAt() time.Time
- func (s Server) PlayerSnapshotsCreatedAt() time.Time
- func (s Server) SnapshotCreatedAt() time.Time
- func (s Server) Special() bool
- func (s Server) ToCursor() (ServerCursor, error)
- func (s Server) TribeDataSyncedAt() time.Time
- func (s Server) TribeSnapshotsCreatedAt() time.Time
- func (s Server) URL() *url.URL
- func (s Server) UnitInfo() UnitInfo
- func (s Server) VersionCode() string
- func (s Server) VillageDataSyncedAt() time.Time
- type ServerConfig
- func (s ServerConfig) Ally() ServerConfigAlly
- func (s ServerConfig) Build() ServerConfigBuild
- func (s ServerConfig) Buildings() ServerConfigBuildings
- func (s ServerConfig) Commands() ServerConfigCommands
- func (s ServerConfig) Coord() ServerConfigCoord
- func (s ServerConfig) Game() ServerConfigGame
- func (s ServerConfig) Misc() ServerConfigMisc
- func (s ServerConfig) Moral() int
- func (s ServerConfig) Newbie() ServerConfigNewbie
- func (s ServerConfig) Night() ServerConfigNight
- func (s ServerConfig) Sitter() ServerConfigSitter
- func (s ServerConfig) Sleep() ServerConfigSleep
- func (s ServerConfig) Snob() ServerConfigSnob
- func (s ServerConfig) Speed() float64
- func (s ServerConfig) UnitSpeed() float64
- func (s ServerConfig) Win() ServerConfigWin
- 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 ServerCursor
- type ServerMap
- func (m *ServerMap) BackgroundColor() color.RGBA
- func (m *ServerMap) CenterX() int
- func (m *ServerMap) CenterY() int
- func (m *ServerMap) ContinentGrid() bool
- func (m *ServerMap) ContinentNumberColor() color.RGBA
- func (m *ServerMap) ContinentNumbers() bool
- func (m *ServerMap) Generate(w io.Writer) error
- func (m *ServerMap) GridLineColor() color.RGBA
- func (m *ServerMap) LegendEntries() []ServerMapLegendEntry
- func (m *ServerMap) Scale() float32
- func (m *ServerMap) SetBackgroundColor(backgroundColor color.RGBA) error
- func (m *ServerMap) SetCenterX(centerX int) error
- func (m *ServerMap) SetCenterY(centerY int) error
- func (m *ServerMap) SetContinentGrid(continentGrid bool) error
- func (m *ServerMap) SetContinentNumberColor(continentNumberColor color.RGBA) error
- func (m *ServerMap) SetContinentNumbers(continentNumbers bool) error
- func (m *ServerMap) SetGridLineColor(gridLineColor color.RGBA) error
- func (m *ServerMap) SetLegendEntries(legendEntries []ServerMapLegendEntry) error
- func (m *ServerMap) SetScale(scale float32) error
- type ServerMapLegendEntry
- type ServerMapMarker
- type ServerMeta
- type ServerNotFoundError
- type ServerSnapshot
- func (ss ServerSnapshot) CreatedAt() time.Time
- func (ss ServerSnapshot) Date() time.Time
- func (ss ServerSnapshot) ID() int
- func (ss ServerSnapshot) IsZero() bool
- func (ss ServerSnapshot) NumActivePlayers() int
- func (ss ServerSnapshot) NumActiveTribes() int
- func (ss ServerSnapshot) NumBarbarianVillages() int
- func (ss ServerSnapshot) NumBonusVillages() int
- func (ss ServerSnapshot) NumInactivePlayers() int
- func (ss ServerSnapshot) NumInactiveTribes() int
- func (ss ServerSnapshot) NumPlayerVillages() int
- func (ss ServerSnapshot) NumPlayers() int
- func (ss ServerSnapshot) NumTribes() int
- func (ss ServerSnapshot) NumVillages() int
- func (ss ServerSnapshot) ServerKey() string
- func (ss ServerSnapshot) ToCursor() (ServerSnapshotCursor, error)
- func (ss ServerSnapshot) WithRelations(server ServerMeta) ServerSnapshotWithRelations
- type ServerSnapshotCursor
- type ServerSnapshotSort
- type ServerSnapshotWithRelations
- type ServerSnapshots
- type ServerSnapshotsWithRelations
- type ServerSort
- type ServerSyncedEventPayload
- type Servers
- type SliceElementValidationError
- func (e SliceElementValidationError) Code() string
- func (e SliceElementValidationError) Error() string
- func (e SliceElementValidationError) Params() map[string]any
- func (e SliceElementValidationError) Path() ErrorPathSegment
- func (e SliceElementValidationError) Type() ErrorType
- func (e SliceElementValidationError) Unwrap() error
- type SnapshotsCreatedEventPayload
- type SortConflictError
- type SyncEnnoblementsCmdPayload
- type SyncServersCmdPayload
- type Tribe
- func (t Tribe) AllPoints() int
- func (t Tribe) Base() BaseTribe
- func (t Tribe) BestRank() int
- func (t Tribe) BestRankAt() time.Time
- func (t Tribe) CreatedAt() time.Time
- func (t Tribe) DeletedAt() time.Time
- func (t Tribe) Dominance() float64
- func (t Tribe) ID() int
- func (t Tribe) IsDeleted() bool
- func (t Tribe) IsZero() bool
- func (t Tribe) Meta() TribeMeta
- func (t Tribe) MostPoints() int
- func (t Tribe) MostPointsAt() time.Time
- func (t Tribe) MostVillages() int
- func (t Tribe) MostVillagesAt() time.Time
- func (t Tribe) Name() string
- func (t Tribe) NumMembers() int
- func (t Tribe) NumVillages() int
- func (t Tribe) OD() OpponentsDefeated
- func (t Tribe) Points() int
- func (t Tribe) ProfileURL() *url.URL
- func (t Tribe) Rank() int
- func (t Tribe) ServerKey() string
- func (t Tribe) Tag() string
- func (t Tribe) ToCursor() (TribeCursor, error)
- func (t Tribe) WithRelations(server ServerMeta) TribeWithRelations
- type TribeChange
- func (tc TribeChange) CreatedAt() time.Time
- func (tc TribeChange) ID() int
- func (tc TribeChange) IsZero() bool
- func (tc TribeChange) NewTribeID() int
- func (tc TribeChange) OldTribeID() int
- func (tc TribeChange) PlayerID() int
- func (tc TribeChange) ServerKey() string
- func (tc TribeChange) ToCursor() (TribeChangeCursor, error)
- func (tc TribeChange) WithRelations(player PlayerMeta, oldTribe NullTribeMeta, newTribe NullTribeMeta) TribeChangeWithRelations
- type TribeChangeCursor
- type TribeChangeSort
- type TribeChangeWithRelations
- type TribeChanges
- type TribeChangesWithRelations
- type TribeCursor
- func (tc TribeCursor) DeletedAt() time.Time
- func (tc TribeCursor) Dominance() float64
- func (tc TribeCursor) Encode() string
- func (tc TribeCursor) ID() int
- func (tc TribeCursor) IsZero() bool
- func (tc TribeCursor) MostPoints() int
- func (tc TribeCursor) ODScoreAtt() int
- func (tc TribeCursor) ODScoreDef() int
- func (tc TribeCursor) ODScoreTotal() int
- func (tc TribeCursor) Points() int
- func (tc TribeCursor) ServerKey() string
- type TribeMeta
- type TribeNotFoundError
- type TribeSnapshot
- func (ts TribeSnapshot) AllPoints() int
- func (ts TribeSnapshot) CreatedAt() time.Time
- func (ts TribeSnapshot) Date() time.Time
- func (ts TribeSnapshot) Dominance() float64
- func (ts TribeSnapshot) ID() int
- func (ts TribeSnapshot) IsZero() bool
- func (ts TribeSnapshot) NumMembers() int
- func (ts TribeSnapshot) NumVillages() int
- func (ts TribeSnapshot) OD() OpponentsDefeated
- func (ts TribeSnapshot) Points() int
- func (ts TribeSnapshot) Rank() int
- func (ts TribeSnapshot) ServerKey() string
- func (ts TribeSnapshot) ToCursor() (TribeSnapshotCursor, error)
- func (ts TribeSnapshot) TribeID() int
- func (ts TribeSnapshot) WithRelations(tribe TribeMeta) TribeSnapshotWithRelations
- type TribeSnapshotCursor
- type TribeSnapshotSort
- type TribeSnapshotWithRelations
- type TribeSnapshots
- type TribeSnapshotsWithRelations
- type TribeSort
- type TribeWithRelations
- type Tribes
- type TribesSyncedEventPayload
- func (p TribesSyncedEventPayload) NumActiveTribes() int
- func (p TribesSyncedEventPayload) NumInactiveTribes() int
- func (p TribesSyncedEventPayload) NumTribes() int
- func (p TribesSyncedEventPayload) ServerKey() string
- func (p TribesSyncedEventPayload) ServerURL() *url.URL
- func (p TribesSyncedEventPayload) VersionCode() string
- type TribesWithRelations
- type Unit
- type UnitInfo
- func (u UnitInfo) Archer() Unit
- func (u UnitInfo) Axe() Unit
- func (u UnitInfo) Catapult() Unit
- func (u UnitInfo) Heavy() Unit
- func (u UnitInfo) Knight() Unit
- func (u UnitInfo) Light() Unit
- func (u UnitInfo) Marcher() Unit
- func (u UnitInfo) Militia() Unit
- func (u UnitInfo) Ram() Unit
- func (u UnitInfo) Snob() Unit
- func (u UnitInfo) Spear() Unit
- func (u UnitInfo) Spy() Unit
- func (u UnitInfo) Sword() Unit
- type UnsupportedSortStringError
- type UpdateServerParams
- func (params *UpdateServerParams) BuildingInfo() NullBuildingInfo
- func (params *UpdateServerParams) Config() NullServerConfig
- func (params *UpdateServerParams) EnnoblementDataSyncedAt() NullTime
- func (params *UpdateServerParams) IsZero() bool
- func (params *UpdateServerParams) NumActivePlayers() NullInt
- func (params *UpdateServerParams) NumActiveTribes() NullInt
- func (params *UpdateServerParams) NumBarbarianVillages() NullInt
- func (params *UpdateServerParams) NumBonusVillages() NullInt
- func (params *UpdateServerParams) NumInactivePlayers() NullInt
- func (params *UpdateServerParams) NumInactiveTribes() NullInt
- func (params *UpdateServerParams) NumPlayerVillages() NullInt
- func (params *UpdateServerParams) NumPlayers() NullInt
- func (params *UpdateServerParams) NumTribes() NullInt
- func (params *UpdateServerParams) NumVillages() NullInt
- func (params *UpdateServerParams) PlayerDataSyncedAt() NullTime
- func (params *UpdateServerParams) PlayerSnapshotsCreatedAt() NullTime
- func (params *UpdateServerParams) SetBuildingInfo(buildingInfo NullBuildingInfo) error
- func (params *UpdateServerParams) SetConfig(config NullServerConfig) error
- func (params *UpdateServerParams) SetEnnoblementDataSyncedAt(ennoblementDataSyncedAt NullTime) error
- func (params *UpdateServerParams) SetNumActivePlayers(num NullInt) error
- func (params *UpdateServerParams) SetNumActiveTribes(num NullInt) error
- func (params *UpdateServerParams) SetNumBarbarianVillages(numBarbarianVillages NullInt) error
- func (params *UpdateServerParams) SetNumBonusVillages(numBonusVillages NullInt) error
- func (params *UpdateServerParams) SetNumInactivePlayers(num NullInt) error
- func (params *UpdateServerParams) SetNumInactiveTribes(num NullInt) error
- func (params *UpdateServerParams) SetNumPlayerVillages(numPlayerVillages NullInt) error
- func (params *UpdateServerParams) SetNumPlayers(num NullInt) error
- func (params *UpdateServerParams) SetNumTribes(num NullInt) error
- func (params *UpdateServerParams) SetNumVillages(numVillages NullInt) error
- func (params *UpdateServerParams) SetPlayerDataSyncedAt(playerDataSyncedAt NullTime) error
- func (params *UpdateServerParams) SetPlayerSnapshotsCreatedAt(playerSnapshotsCreatedAt NullTime) error
- func (params *UpdateServerParams) SetSnapshotCreatedAt(snapshotCreatedAt NullTime) error
- func (params *UpdateServerParams) SetTribeDataSyncedAt(tribeDataSyncedAt NullTime) error
- func (params *UpdateServerParams) SetTribeSnapshotsCreatedAt(tribeSnapshotsCreatedAt NullTime) error
- func (params *UpdateServerParams) SetUnitInfo(unitInfo NullUnitInfo) error
- func (params *UpdateServerParams) SetVillageDataSyncedAt(villageDataSyncedAt NullTime) error
- func (params *UpdateServerParams) SnapshotCreatedAt() NullTime
- func (params *UpdateServerParams) TribeDataSyncedAt() NullTime
- func (params *UpdateServerParams) TribeSnapshotsCreatedAt() NullTime
- func (params *UpdateServerParams) UnitInfo() NullUnitInfo
- func (params *UpdateServerParams) VillageDataSyncedAt() NullTime
- type ValidationError
- type Version
- type VersionCursor
- type VersionNotFoundError
- type VersionSort
- type Versions
- type Village
- func (v Village) Base() BaseVillage
- func (v Village) Bonus() int
- func (v Village) Continent() string
- func (v Village) Coords() Coords
- func (v Village) CreatedAt() time.Time
- func (v Village) FullName() string
- func (v Village) ID() int
- func (v Village) IsZero() bool
- func (v Village) Meta() VillageMeta
- func (v Village) Name() string
- func (v Village) PlayerID() int
- func (v Village) Points() int
- func (v Village) ProfileURL() *url.URL
- func (v Village) ServerKey() string
- func (v Village) ToCursor() (VillageCursor, error)
- func (v Village) WithRelations(player NullPlayerMetaWithRelations) VillageWithRelations
- func (v Village) X() int
- func (v Village) Y() int
- type VillageCursor
- type VillageMeta
- func (v VillageMeta) Continent() string
- func (v VillageMeta) FullName() string
- func (v VillageMeta) ID() int
- func (v VillageMeta) IsZero() bool
- func (v VillageMeta) Name() string
- func (v VillageMeta) ProfileURL() *url.URL
- func (v VillageMeta) WithRelations(player NullPlayerMetaWithRelations) VillageMetaWithRelations
- func (v VillageMeta) X() int
- func (v VillageMeta) Y() int
- type VillageMetaWithRelations
- type VillageNotFoundError
- type VillageSort
- type VillageWithRelations
- type Villages
- type VillagesSyncedEventPayload
- func (p VillagesSyncedEventPayload) NumBarbarianVillages() int
- func (p VillagesSyncedEventPayload) NumBonusVillages() int
- func (p VillagesSyncedEventPayload) NumPlayerVillages() int
- func (p VillagesSyncedEventPayload) NumVillages() int
- func (p VillagesSyncedEventPayload) ServerKey() string
- func (p VillagesSyncedEventPayload) ServerURL() *url.URL
- func (p VillagesSyncedEventPayload) VersionCode() string
- type VillagesWithRelations
Constants ¶
const ( ListEnnoblementsParamsSortMinLength = 0 ListEnnoblementsParamsSortMaxLength = 3 )
const ( ListEnnoblementsParamsLimitMin = 1 ListEnnoblementsParamsLimitMax = 500 )
const ( PlayerNameMinLength = 1 PlayerNameMaxLength = 150 )
const ( ListPlayersParamsNamesMinLength = 0 ListPlayersParamsNamesMaxLength = ListPlayersParamsLimitMax )
const ( ListPlayersParamsQMinLength = 3 ListPlayersParamsQMaxLength = 255 )
const ( ListPlayersParamsSortMinLength = 0 ListPlayersParamsSortMaxLength = 4 )
const ( ListPlayersParamsLimitMin = 1 ListPlayersParamsLimitMax = 500 )
const ( ListPlayerSnapshotsParamsSortMinLength = 0 ListPlayerSnapshotsParamsSortMaxLength = 3 )
const ( ListPlayerSnapshotsParamsLimitMin = 1 ListPlayerSnapshotsParamsLimitMax = 500 )
const ( ListServersParamsSortMinLength = 0 ListServersParamsSortMaxLength = 2 )
const ( ListServersParamsLimitMin = 1 ListServersParamsLimitMax = 500 )
const ( ListServerSnapshotsParamsSortMinLength = 0 ListServerSnapshotsParamsSortMaxLength = 3 )
const ( ListServerSnapshotsParamsLimitMin = 1 ListServerSnapshotsParamsLimitMix = 500 )
const ( TribeNameMinLength = 1 TribeNameMaxLength = 255 TribeTagMinLength = 1 TribeTagMaxLength = 10 )
const ( ListTribesParamsTagsMinLength = 0 ListTribesParamsTagsMaxLength = ListTribesParamsLimitMax )
const ( ListTribesParamsQMinLength = 2 ListTribesParamsQMaxLength = 255 )
const ( ListTribesParamsSortMinLength = 0 ListTribesParamsSortMaxLength = 4 )
const ( ListTribesParamsLimitMin = 1 ListTribesParamsLimitMax = 500 )
const ( ListTribeChangesParamsSortMinLength = 0 ListTribeChangesParamsSortMaxLength = 3 )
const ( ListTribeChangesParamsLimitMin = 1 ListTribeChangesParamsLimitMax = 500 )
const ( ListTribeSnapshotsParamsSortMinLength = 0 ListTribeSnapshotsParamsSortMaxLength = 3 )
const ( ListTribeSnapshotsParamsLimitMin = 1 ListTribeSnapshotsParamsLimitMax = 500 )
const ( ListVersionsParamsSortMinLength = 0 ListVersionsParamsSortMaxLength = 1 )
const ( ListVersionsParamsLimitMin = 1 ListVersionsParamsLimitMax = 500 )
const ( VillageNameMinLength = 1 VillageNameMaxLength = 150 VillageContinentMinLength = 1 VillageContinentMaxLength = 5 )
const ( ListVillagesParamsCoordsMinLength = 0 ListVillagesParamsCoordsMaxLength = ListVillagesParamsLimitMax )
const ( ListVillagesParamsSortMinLength = 0 ListVillagesParamsSortMaxLength = 2 )
const ( ListVillagesParamsLimitMin = 1 ListVillagesParamsLimitMax = 500 )
const EnnoblementRetentionForClosedServers = 365 * 24 * time.Hour
const ModelNameBaseEnnoblement = "BaseEnnoblement"
const ModelNameBasePlayer = "BasePlayer"
const ModelNameBaseServer = "BaseServer"
const ModelNameBaseTribe = "BaseTribe"
const ModelNameBaseVillage = "BaseVillage"
const ModelNameCleanUpDataCmdPayload = "CleanUpDataCmdPayload"
const ModelNameCleanUpDataCmdPayloadServer = "CleanUpDataCmdPayloadServer"
const ModelNameCountPlayersParams = "CountPlayersParams"
const ModelNameCountTribesParams = "CountTribesParams"
const ModelNameCreateEnnoblementParams = "CreateEnnoblementParams"
const ModelNameCreatePlayerParams = "CreatePlayerParams"
const ModelNameCreateServerParams = "CreateServerParams"
const ModelNameCreateSnapshotsCmdPayload = "CreateSnapshotsCmdPayload"
const ModelNameCreateTribeChangeParams = "CreateTribeChangeParams"
const ModelNameCreateTribeParams = "CreateTribeParams"
const ModelNameCreateVillageParams = "CreateVillageParams"
const ModelNameEnnoblement = "Ennoblement"
const ModelNameEnnoblementCursor = "EnnoblementCursor"
const ModelNameEnnoblementsSyncedEventPayload = "EnnoblementsSyncedEventPayload"
const ModelNameListEnnoblementsParams = "ListEnnoblementsParams"
const ModelNameListEnnoblementsResult = "ListEnnoblementsResult"
const ModelNameListEnnoblementsWithRelationsResult = "ListEnnoblementsWithRelationsResult"
const ModelNameListPlayerSnapshotsParams = "ListPlayerSnapshotsParams"
const ModelNameListPlayerSnapshotsResult = "ListPlayerSnapshotsResult"
const ModelNameListPlayerSnapshotsWithRelationsResult = "ListPlayerSnapshotsWithRelationsResult"
const ModelNameListPlayersParams = "ListPlayersParams"
const ModelNameListPlayersResult = "ListPlayersResult"
const ModelNameListPlayersWithRelationsResult = "ListPlayersWithRelationsResult"
const ModelNameListServerSnapshotsParams = "ListServerSnapshotsParams"
const ModelNameListServerSnapshotsResult = "ListServerSnapshotsResult"
const ModelNameListServerSnapshotsWithRelationsResult = "ListServerSnapshotsWithRelationsResult"
const ModelNameListServersParams = "ListServersParams"
const ModelNameListServersResult = "ListServersResult"
const ModelNameListTribeChangesParams = "ListTribeChangesParams"
const ModelNameListTribeChangesResult = "ListTribeChangesResult"
const ModelNameListTribeChangesWithRelationsResult = "ListTribeChangesWithRelationsResult"
const ModelNameListTribeSnapshotsParams = "ListTribeSnapshotsParams"
const ModelNameListTribeSnapshotsResult = "ListTribeSnapshotsResult"
const ModelNameListTribeSnapshotsWithRelationsResult = "ListTribeSnapshotsWithRelationsResult"
const ModelNameListTribesParams = "ListTribesParams"
const ModelNameListTribesResult = "ListTribesResult"
const ModelNameListTribesWithRelationsResult = "ListTribesWithRelationsResult"
const ModelNameListVersionsParams = "ListVersionsParams"
const ModelNameListVersionsResult = "ListVersionsResult"
const ModelNameListVillagesParams = "ListVillagesParams"
const ModelNameListVillagesResult = "ListVillagesResult"
const ModelNameListVillagesWithRelationsResult = "ListVillagesWithRelationsResult"
const ModelNameOpponentsDefeated = "OpponentsDefeated"
const ModelNamePlayer = "Player"
const ModelNamePlayerCursor = "PlayerCursor"
const ModelNamePlayerMeta = "PlayerMeta"
const ModelNamePlayerSnapshot = "PlayerSnapshot"
const ModelNamePlayerSnapshotCursor = "PlayerSnapshotCursor"
const ModelNamePlayersSyncedEventPayload = "PlayersSyncedEventPayload"
const ModelNameServer = "Server"
const ModelNameServerCursor = "ServerCursor"
const ModelNameServerMap = "ServerMap"
const ModelNameServerMeta = "ServerMeta"
const ModelNameServerSnapshot = "ServerSnapshot"
const ModelNameServerSnapshotCursor = "ServerSnapshotCursor"
const ModelNameServerSyncedEventPayload = "ServerSyncedEventPayload"
const ModelNameSnapshotsCreatedEventPayload = "SnapshotsCreatedEventPayload"
const ModelNameSyncEnnoblementsCmdPayload = "SyncEnnoblementsCmdPayload"
const ModelNameSyncServersCmdPayload = "SyncServersCmdPayload"
const ModelNameTribe = "Tribe"
const ModelNameTribeChange = "TribeChange"
const ModelNameTribeChangeCursor = "TribeChangeCursor"
const ModelNameTribeCursor = "TribeCursor"
const ModelNameTribeMeta = "TribeMeta"
const ModelNameTribeSnapshot = "TribeSnapshot"
const ModelNameTribeSnapshotCursor = "TribeSnapshotCursor"
const ModelNameTribesSyncedEventPayload = "TribesSyncedEventPayload"
const ModelNameUpdateServerParams = "UpdateServerParams"
const ModelNameVersion = "Version"
const ModelNameVersionCursor = "VersionCursor"
const ModelNameVillage = "Village"
const ModelNameVillageCursor = "VillageCursor"
const ModelNameVillageMeta = "VillageMeta"
const ModelNameVillagesSyncedEventPayload = "VillagesSyncedEventPayload"
const PlayerSnapshotRetentionForClosedServers = 180 * 24 * time.Hour
const TribeSnapshotRetentionForClosedServers = 180 * 24 * time.Hour
Variables ¶
var ErrInvalidCoordsString error = simpleError{ // contains filtered or unexported fields }
var ErrInvalidCursor error = simpleError{ // contains filtered or unexported fields }
ErrInvalidCursor is an error that is returned when a cursor can't be decoded (e.g. is malformed).
var ErrNil error = simpleError{ // contains filtered or unexported fields }
var ErrRequired error = simpleError{ // contains filtered or unexported fields }
var ErrTooManyLegendEntries error = simpleError{ // contains filtered or unexported fields }
Functions ¶
This section is empty.
Types ¶
type BaseEnnoblement ¶
type BaseEnnoblement struct {
// contains filtered or unexported fields
}
func NewBaseEnnoblement ¶ added in v1.0.0
func (BaseEnnoblement) CreatedAt ¶
func (e BaseEnnoblement) CreatedAt() time.Time
func (BaseEnnoblement) IsZero ¶ added in v1.0.0
func (e BaseEnnoblement) IsZero() bool
func (BaseEnnoblement) NewOwnerID ¶
func (e BaseEnnoblement) NewOwnerID() int
func (BaseEnnoblement) NewTribeID ¶
func (e BaseEnnoblement) NewTribeID() int
func (BaseEnnoblement) OldOwnerID ¶
func (e BaseEnnoblement) OldOwnerID() int
func (BaseEnnoblement) OldTribeID ¶
func (e BaseEnnoblement) OldTribeID() int
func (BaseEnnoblement) Points ¶
func (e BaseEnnoblement) Points() int
func (BaseEnnoblement) VillageID ¶
func (e BaseEnnoblement) VillageID() int
type BaseEnnoblements ¶ added in v1.0.0
type BaseEnnoblements []BaseEnnoblement
type BasePlayer ¶
type BasePlayer struct {
// contains filtered or unexported fields
}
func NewBasePlayer ¶ added in v1.0.0
func (BasePlayer) ID ¶
func (p BasePlayer) ID() int
func (BasePlayer) IsZero ¶ added in v1.0.0
func (p BasePlayer) IsZero() bool
func (BasePlayer) Name ¶
func (p BasePlayer) Name() string
func (BasePlayer) NumVillages ¶
func (p BasePlayer) NumVillages() int
func (BasePlayer) OD ¶ added in v1.0.0
func (p BasePlayer) OD() OpponentsDefeated
func (BasePlayer) Points ¶
func (p BasePlayer) Points() int
func (BasePlayer) ProfileURL ¶ added in v0.1.7
func (p BasePlayer) ProfileURL() *url.URL
func (BasePlayer) Rank ¶
func (p BasePlayer) Rank() int
func (BasePlayer) TribeID ¶
func (p BasePlayer) TribeID() int
type BasePlayers ¶ added in v1.0.0
type BasePlayers []BasePlayer
type BaseServer ¶ added in v1.0.0
type BaseServer struct {
// contains filtered or unexported fields
}
func NewBaseServer ¶ added in v1.0.0
func (BaseServer) IsZero ¶ added in v1.0.0
func (s BaseServer) IsZero() bool
func (BaseServer) Key ¶ added in v1.0.0
func (s BaseServer) Key() string
func (BaseServer) Open ¶ added in v1.0.0
func (s BaseServer) Open() bool
func (BaseServer) URL ¶ added in v1.0.0
func (s BaseServer) URL() *url.URL
type BaseServers ¶ added in v1.0.0
type BaseServers []BaseServer
func (BaseServers) FilterOutSpecial ¶ added in v1.0.0
func (ss BaseServers) FilterOutSpecial(specials Servers) BaseServers
type BaseTribe ¶
type BaseTribe struct {
// contains filtered or unexported fields
}
func NewBaseTribe ¶ added in v1.0.0
func (BaseTribe) NumMembers ¶
func (BaseTribe) NumVillages ¶
func (BaseTribe) OD ¶ added in v1.0.0
func (t BaseTribe) OD() OpponentsDefeated
func (BaseTribe) ProfileURL ¶ added in v0.1.7
type BaseTribes ¶ added in v1.0.0
type BaseTribes []BaseTribe
type BaseVillage ¶
type BaseVillage struct {
// contains filtered or unexported fields
}
func NewBaseVillage ¶ added in v1.0.0
func (BaseVillage) Bonus ¶
func (v BaseVillage) Bonus() int
func (BaseVillage) Continent ¶
func (v BaseVillage) Continent() string
func (BaseVillage) ID ¶
func (v BaseVillage) ID() int
func (BaseVillage) IsZero ¶ added in v1.0.0
func (v BaseVillage) IsZero() bool
func (BaseVillage) Name ¶
func (v BaseVillage) Name() string
func (BaseVillage) PlayerID ¶
func (v BaseVillage) PlayerID() int
func (BaseVillage) Points ¶
func (v BaseVillage) Points() int
func (BaseVillage) ProfileURL ¶ added in v0.1.7
func (v BaseVillage) ProfileURL() *url.URL
func (BaseVillage) X ¶
func (v BaseVillage) X() int
func (BaseVillage) Y ¶
func (v BaseVillage) Y() int
type BaseVillages ¶ added in v1.0.0
type BaseVillages []BaseVillage
type BuildingInfo ¶
type BuildingInfo struct {
// contains filtered or unexported fields
}
func NewBuildingInfo ¶ added in v1.0.0
func NewBuildingInfo( main Building, barracks Building, stable Building, garage Building, watchtower Building, snob Building, smith Building, place Building, statue Building, market Building, wood Building, stone Building, iron Building, farm Building, storage Building, hide Building, wall Building, ) (BuildingInfo, error)
func (BuildingInfo) Barracks ¶
func (b BuildingInfo) Barracks() Building
func (BuildingInfo) Farm ¶
func (b BuildingInfo) Farm() Building
func (BuildingInfo) Garage ¶
func (b BuildingInfo) Garage() Building
func (BuildingInfo) Hide ¶
func (b BuildingInfo) Hide() Building
func (BuildingInfo) Iron ¶
func (b BuildingInfo) Iron() Building
func (BuildingInfo) Main ¶
func (b BuildingInfo) Main() Building
func (BuildingInfo) Market ¶
func (b BuildingInfo) Market() Building
func (BuildingInfo) Place ¶
func (b BuildingInfo) Place() Building
func (BuildingInfo) Smith ¶
func (b BuildingInfo) Smith() Building
func (BuildingInfo) Snob ¶
func (b BuildingInfo) Snob() Building
func (BuildingInfo) Stable ¶
func (b BuildingInfo) Stable() Building
func (BuildingInfo) Statue ¶
func (b BuildingInfo) Statue() Building
func (BuildingInfo) Stone ¶
func (b BuildingInfo) Stone() Building
func (BuildingInfo) Storage ¶
func (b BuildingInfo) Storage() Building
func (BuildingInfo) Wall ¶
func (b BuildingInfo) Wall() Building
func (BuildingInfo) Watchtower ¶
func (b BuildingInfo) Watchtower() Building
func (BuildingInfo) Wood ¶
func (b BuildingInfo) Wood() Building
type CleanUpDataCmdPayload ¶ added in v1.0.0
type CleanUpDataCmdPayload struct {
// contains filtered or unexported fields
}
func NewCleanUpDataCmdPayload ¶ added in v1.0.0
func NewCleanUpDataCmdPayload(server CleanUpDataCmdPayloadServer) (CleanUpDataCmdPayload, error)
func (CleanUpDataCmdPayload) CanCleanUpEnnoblements ¶ added in v1.0.0
func (p CleanUpDataCmdPayload) CanCleanUpEnnoblements() bool
func (CleanUpDataCmdPayload) CanCleanUpPlayerSnapshots ¶ added in v1.0.0
func (p CleanUpDataCmdPayload) CanCleanUpPlayerSnapshots() bool
func (CleanUpDataCmdPayload) CanCleanUpTribeSnapshots ¶ added in v1.0.0
func (p CleanUpDataCmdPayload) CanCleanUpTribeSnapshots() bool
func (CleanUpDataCmdPayload) Server ¶ added in v1.0.0
func (p CleanUpDataCmdPayload) Server() CleanUpDataCmdPayloadServer
type CleanUpDataCmdPayloadServer ¶ added in v1.0.0
type CleanUpDataCmdPayloadServer struct {
// contains filtered or unexported fields
}
func NewCleanUpDataCmdPayloadServer ¶ added in v1.0.0
func NewCleanUpDataCmdPayloadServer( key string, versionCode string, open bool, special bool, playerDataSyncedAt time.Time, playerSnapshotsCreatedAt time.Time, tribeDataSyncedAt time.Time, tribeSnapshotsCreatedAt time.Time, villageDataSyncedAt time.Time, ennoblementDataSyncedAt time.Time, ) (CleanUpDataCmdPayloadServer, error)
func (CleanUpDataCmdPayloadServer) EnnoblementDataSyncedAt ¶ added in v1.0.0
func (s CleanUpDataCmdPayloadServer) EnnoblementDataSyncedAt() time.Time
func (CleanUpDataCmdPayloadServer) IsZero ¶ added in v1.0.0
func (s CleanUpDataCmdPayloadServer) IsZero() bool
func (CleanUpDataCmdPayloadServer) Key ¶ added in v1.0.0
func (s CleanUpDataCmdPayloadServer) Key() string
func (CleanUpDataCmdPayloadServer) Open ¶ added in v1.0.0
func (s CleanUpDataCmdPayloadServer) Open() bool
func (CleanUpDataCmdPayloadServer) PlayerDataSyncedAt ¶ added in v1.0.0
func (s CleanUpDataCmdPayloadServer) PlayerDataSyncedAt() time.Time
func (CleanUpDataCmdPayloadServer) PlayerSnapshotsCreatedAt ¶ added in v1.0.0
func (s CleanUpDataCmdPayloadServer) PlayerSnapshotsCreatedAt() time.Time
func (CleanUpDataCmdPayloadServer) Special ¶ added in v1.0.0
func (s CleanUpDataCmdPayloadServer) Special() bool
func (CleanUpDataCmdPayloadServer) TribeDataSyncedAt ¶ added in v1.0.0
func (s CleanUpDataCmdPayloadServer) TribeDataSyncedAt() time.Time
func (CleanUpDataCmdPayloadServer) TribeSnapshotsCreatedAt ¶ added in v1.0.0
func (s CleanUpDataCmdPayloadServer) TribeSnapshotsCreatedAt() time.Time
func (CleanUpDataCmdPayloadServer) VersionCode ¶ added in v1.0.0
func (s CleanUpDataCmdPayloadServer) VersionCode() string
func (CleanUpDataCmdPayloadServer) VillageDataSyncedAt ¶ added in v1.0.0
func (s CleanUpDataCmdPayloadServer) VillageDataSyncedAt() time.Time
type CountPlayersParams ¶ added in v1.1.0
type CountPlayersParams struct {
// contains filtered or unexported fields
}
func NewCountPlayersParams ¶ added in v1.1.0
func NewCountPlayersParams() CountPlayersParams
func (*CountPlayersParams) ServerKeys ¶ added in v1.1.0
func (params *CountPlayersParams) ServerKeys() []string
func (*CountPlayersParams) SetServerKeys ¶ added in v1.1.0
func (params *CountPlayersParams) SetServerKeys(serverKeys []string) error
type CountTribesParams ¶ added in v1.1.0
type CountTribesParams struct {
// contains filtered or unexported fields
}
func NewCountTribesParams ¶ added in v1.1.0
func NewCountTribesParams() CountTribesParams
func (*CountTribesParams) ServerKeys ¶ added in v1.1.0
func (params *CountTribesParams) ServerKeys() []string
func (*CountTribesParams) SetServerKeys ¶ added in v1.1.0
func (params *CountTribesParams) SetServerKeys(serverKeys []string) error
type CreateEnnoblementParams ¶
type CreateEnnoblementParams struct {
// contains filtered or unexported fields
}
func NewCreateEnnoblementParams ¶ added in v1.0.0
func NewCreateEnnoblementParams(serverKey string, ennoblements BaseEnnoblements) ([]CreateEnnoblementParams, error)
func (CreateEnnoblementParams) Base ¶ added in v1.0.0
func (params CreateEnnoblementParams) Base() BaseEnnoblement
func (CreateEnnoblementParams) ServerKey ¶
func (params CreateEnnoblementParams) ServerKey() string
type CreatePlayerParams ¶
type CreatePlayerParams struct {
// contains filtered or unexported fields
}
func NewCreatePlayerParams ¶ added in v1.0.0
func NewCreatePlayerParams(serverKey string, players BasePlayers, storedPlayers Players) ([]CreatePlayerParams, error)
NewCreatePlayerParams constructs a slice of CreatePlayerParams based on the given parameters. Both slices must be sorted in ascending order by ID + if storedPlayers contains players from different servers. they must be sorted in ascending order by server key.
func (CreatePlayerParams) Base ¶ added in v1.0.0
func (params CreatePlayerParams) Base() BasePlayer
func (CreatePlayerParams) BestRank ¶ added in v0.4.5
func (params CreatePlayerParams) BestRank() int
func (CreatePlayerParams) BestRankAt ¶ added in v0.4.5
func (params CreatePlayerParams) BestRankAt() time.Time
func (CreatePlayerParams) LastActivityAt ¶ added in v0.4.5
func (params CreatePlayerParams) LastActivityAt() time.Time
func (CreatePlayerParams) MostPoints ¶ added in v0.4.5
func (params CreatePlayerParams) MostPoints() int
func (CreatePlayerParams) MostPointsAt ¶ added in v0.4.5
func (params CreatePlayerParams) MostPointsAt() time.Time
func (CreatePlayerParams) MostVillages ¶ added in v0.4.5
func (params CreatePlayerParams) MostVillages() int
func (CreatePlayerParams) MostVillagesAt ¶ added in v0.4.5
func (params CreatePlayerParams) MostVillagesAt() time.Time
func (CreatePlayerParams) ServerKey ¶
func (params CreatePlayerParams) ServerKey() string
type CreatePlayerSnapshotParams ¶ added in v0.3.0
type CreatePlayerSnapshotParams struct {
// contains filtered or unexported fields
}
func NewCreatePlayerSnapshotParams ¶ added in v1.0.0
func NewCreatePlayerSnapshotParams(players Players, date time.Time) ([]CreatePlayerSnapshotParams, error)
func (CreatePlayerSnapshotParams) Date ¶ added in v0.3.0
func (params CreatePlayerSnapshotParams) Date() time.Time
func (CreatePlayerSnapshotParams) NumVillages ¶ added in v0.3.0
func (params CreatePlayerSnapshotParams) NumVillages() int
func (CreatePlayerSnapshotParams) OD ¶ added in v1.0.0
func (params CreatePlayerSnapshotParams) OD() OpponentsDefeated
func (CreatePlayerSnapshotParams) PlayerID ¶ added in v0.3.0
func (params CreatePlayerSnapshotParams) PlayerID() int
func (CreatePlayerSnapshotParams) Points ¶ added in v0.3.0
func (params CreatePlayerSnapshotParams) Points() int
func (CreatePlayerSnapshotParams) Rank ¶ added in v0.3.0
func (params CreatePlayerSnapshotParams) Rank() int
func (CreatePlayerSnapshotParams) ServerKey ¶ added in v0.3.0
func (params CreatePlayerSnapshotParams) ServerKey() string
func (CreatePlayerSnapshotParams) TribeID ¶ added in v0.3.0
func (params CreatePlayerSnapshotParams) TribeID() int
type CreateServerParams ¶
type CreateServerParams struct {
// contains filtered or unexported fields
}
func NewCreateServerParams ¶ added in v1.0.0
func NewCreateServerParams(servers BaseServers, versionCode string) ([]CreateServerParams, error)
func (CreateServerParams) Base ¶ added in v1.0.0
func (params CreateServerParams) Base() BaseServer
func (CreateServerParams) VersionCode ¶
func (params CreateServerParams) VersionCode() string
type CreateServerSnapshotParams ¶ added in v1.1.0
type CreateServerSnapshotParams struct {
// contains filtered or unexported fields
}
func NewCreateServerSnapshotParams ¶ added in v1.1.0
func NewCreateServerSnapshotParams(server Server, date time.Time) (CreateServerSnapshotParams, error)
func (CreateServerSnapshotParams) Date ¶ added in v1.1.0
func (params CreateServerSnapshotParams) Date() time.Time
func (CreateServerSnapshotParams) NumActivePlayers ¶ added in v1.1.0
func (params CreateServerSnapshotParams) NumActivePlayers() int
func (CreateServerSnapshotParams) NumActiveTribes ¶ added in v1.1.0
func (params CreateServerSnapshotParams) NumActiveTribes() int
func (CreateServerSnapshotParams) NumBarbarianVillages ¶ added in v1.1.0
func (params CreateServerSnapshotParams) NumBarbarianVillages() int
func (CreateServerSnapshotParams) NumBonusVillages ¶ added in v1.1.0
func (params CreateServerSnapshotParams) NumBonusVillages() int
func (CreateServerSnapshotParams) NumInactivePlayers ¶ added in v1.1.0
func (params CreateServerSnapshotParams) NumInactivePlayers() int
func (CreateServerSnapshotParams) NumInactiveTribes ¶ added in v1.1.0
func (params CreateServerSnapshotParams) NumInactiveTribes() int
func (CreateServerSnapshotParams) NumPlayerVillages ¶ added in v1.1.0
func (params CreateServerSnapshotParams) NumPlayerVillages() int
func (CreateServerSnapshotParams) NumPlayers ¶ added in v1.1.0
func (params CreateServerSnapshotParams) NumPlayers() int
func (CreateServerSnapshotParams) NumTribes ¶ added in v1.1.0
func (params CreateServerSnapshotParams) NumTribes() int
func (CreateServerSnapshotParams) NumVillages ¶ added in v1.1.0
func (params CreateServerSnapshotParams) NumVillages() int
func (CreateServerSnapshotParams) ServerKey ¶ added in v1.1.0
func (params CreateServerSnapshotParams) ServerKey() string
type CreateSnapshotsCmdPayload ¶ added in v0.3.0
type CreateSnapshotsCmdPayload struct {
// contains filtered or unexported fields
}
func NewCreateSnapshotsCmdPayload ¶ added in v1.0.0
func (CreateSnapshotsCmdPayload) Date ¶ added in v0.3.0
func (p CreateSnapshotsCmdPayload) Date() time.Time
func (CreateSnapshotsCmdPayload) ServerKey ¶ added in v1.0.0
func (p CreateSnapshotsCmdPayload) ServerKey() string
func (CreateSnapshotsCmdPayload) VersionCode ¶ added in v0.3.0
func (p CreateSnapshotsCmdPayload) VersionCode() string
func (CreateSnapshotsCmdPayload) VersionTimezone ¶ added in v1.0.0
func (p CreateSnapshotsCmdPayload) VersionTimezone() string
type CreateTribeChangeParams ¶ added in v0.4.0
type CreateTribeChangeParams struct {
// contains filtered or unexported fields
}
func NewCreateTribeChangeParams ¶ added in v1.0.0
func NewCreateTribeChangeParamsFromPlayers ¶ added in v1.0.0
func NewCreateTribeChangeParamsFromPlayers( serverKey string, players BasePlayers, storedPlayers Players, ) ([]CreateTribeChangeParams, error)
NewCreateTribeChangeParamsFromPlayers constructs a slice of CreatePlayerParams based on the given parameters. Both slices must be sorted in ascending order by ID + if storedPlayers contains players from different servers. they must be sorted in ascending order by server key.
func (CreateTribeChangeParams) NewTribeID ¶ added in v0.4.0
func (params CreateTribeChangeParams) NewTribeID() int
func (CreateTribeChangeParams) OldTribeID ¶ added in v0.4.0
func (params CreateTribeChangeParams) OldTribeID() int
func (CreateTribeChangeParams) PlayerID ¶ added in v0.4.0
func (params CreateTribeChangeParams) PlayerID() int
func (CreateTribeChangeParams) ServerKey ¶ added in v0.4.0
func (params CreateTribeChangeParams) ServerKey() string
type CreateTribeParams ¶
type CreateTribeParams struct {
// contains filtered or unexported fields
}
func NewCreateTribeParams ¶ added in v1.0.0
func NewCreateTribeParams(serverKey string, tribes BaseTribes, storedTribes Tribes) ([]CreateTribeParams, error)
NewCreateTribeParams constructs a slice of CreateTribeParams based on the given parameters. Both slices must be sorted in ascending order by ID + if storedTribes contains tribes from different servers. they must be sorted in ascending order by server key.
func (CreateTribeParams) Base ¶ added in v1.0.0
func (params CreateTribeParams) Base() BaseTribe
func (CreateTribeParams) BestRank ¶ added in v0.4.5
func (params CreateTribeParams) BestRank() int
func (CreateTribeParams) BestRankAt ¶ added in v0.4.5
func (params CreateTribeParams) BestRankAt() time.Time
func (CreateTribeParams) MostPoints ¶ added in v0.4.5
func (params CreateTribeParams) MostPoints() int
func (CreateTribeParams) MostPointsAt ¶ added in v0.4.5
func (params CreateTribeParams) MostPointsAt() time.Time
func (CreateTribeParams) MostVillages ¶ added in v0.4.5
func (params CreateTribeParams) MostVillages() int
func (CreateTribeParams) MostVillagesAt ¶ added in v0.4.5
func (params CreateTribeParams) MostVillagesAt() time.Time
func (CreateTribeParams) ServerKey ¶
func (params CreateTribeParams) ServerKey() string
type CreateTribeSnapshotParams ¶ added in v0.3.0
type CreateTribeSnapshotParams struct {
// contains filtered or unexported fields
}
func NewCreateTribeSnapshotParams ¶ added in v1.0.0
func NewCreateTribeSnapshotParams(tribes Tribes, date time.Time) ([]CreateTribeSnapshotParams, error)
func (CreateTribeSnapshotParams) AllPoints ¶ added in v0.3.0
func (params CreateTribeSnapshotParams) AllPoints() int
func (CreateTribeSnapshotParams) Date ¶ added in v0.3.0
func (params CreateTribeSnapshotParams) Date() time.Time
func (CreateTribeSnapshotParams) Dominance ¶ added in v0.3.0
func (params CreateTribeSnapshotParams) Dominance() float64
func (CreateTribeSnapshotParams) NumMembers ¶ added in v0.3.0
func (params CreateTribeSnapshotParams) NumMembers() int
func (CreateTribeSnapshotParams) NumVillages ¶ added in v0.3.0
func (params CreateTribeSnapshotParams) NumVillages() int
func (CreateTribeSnapshotParams) OD ¶ added in v1.0.0
func (params CreateTribeSnapshotParams) OD() OpponentsDefeated
func (CreateTribeSnapshotParams) Points ¶ added in v0.3.0
func (params CreateTribeSnapshotParams) Points() int
func (CreateTribeSnapshotParams) Rank ¶ added in v0.3.0
func (params CreateTribeSnapshotParams) Rank() int
func (CreateTribeSnapshotParams) ServerKey ¶ added in v0.3.0
func (params CreateTribeSnapshotParams) ServerKey() string
func (CreateTribeSnapshotParams) TribeID ¶ added in v0.3.0
func (params CreateTribeSnapshotParams) TribeID() int
type CreateVillageParams ¶
type CreateVillageParams struct {
// contains filtered or unexported fields
}
func NewCreateVillageParams ¶ added in v1.0.0
func NewCreateVillageParams(serverKey string, villages BaseVillages) ([]CreateVillageParams, error)
func (CreateVillageParams) Base ¶ added in v1.0.0
func (params CreateVillageParams) Base() BaseVillage
func (CreateVillageParams) ServerKey ¶
func (params CreateVillageParams) ServerKey() string
type Ennoblement ¶
type Ennoblement struct {
// contains filtered or unexported fields
}
func UnmarshalEnnoblementFromDatabase ¶ added in v1.0.0
func UnmarshalEnnoblementFromDatabase( id int, serverKey string, villageID int, newOwnerID int, newTribeID int, oldOwnerID int, oldTribeID int, points int, createdAt time.Time, ) (Ennoblement, error)
UnmarshalEnnoblementFromDatabase unmarshals Ennoblement from the database.
It should be used only for unmarshalling from the database! You can't use UnmarshalEnnoblementFromDatabase as constructor - It may put domain into the invalid state!
func (Ennoblement) Base ¶ added in v1.0.0
func (e Ennoblement) Base() BaseEnnoblement
func (Ennoblement) CreatedAt ¶ added in v0.2.0
func (e Ennoblement) CreatedAt() time.Time
func (Ennoblement) ID ¶
func (e Ennoblement) ID() int
func (Ennoblement) IsZero ¶ added in v1.0.0
func (e Ennoblement) IsZero() bool
func (Ennoblement) NewOwnerID ¶ added in v0.2.0
func (e Ennoblement) NewOwnerID() int
func (Ennoblement) NewTribeID ¶ added in v0.2.0
func (e Ennoblement) NewTribeID() int
func (Ennoblement) OldOwnerID ¶ added in v0.2.0
func (e Ennoblement) OldOwnerID() int
func (Ennoblement) OldTribeID ¶ added in v0.2.0
func (e Ennoblement) OldTribeID() int
func (Ennoblement) Points ¶ added in v0.2.0
func (e Ennoblement) Points() int
func (Ennoblement) ServerKey ¶
func (e Ennoblement) ServerKey() string
func (Ennoblement) ToCursor ¶ added in v1.0.0
func (e Ennoblement) ToCursor() (EnnoblementCursor, error)
func (Ennoblement) VillageID ¶ added in v0.2.0
func (e Ennoblement) VillageID() int
func (Ennoblement) WithRelations ¶ added in v1.0.0
func (e Ennoblement) WithRelations( village VillageMeta, newOwner PlayerMeta, newTribe NullTribeMeta, oldOwner NullPlayerMeta, oldTribe NullTribeMeta, ) EnnoblementWithRelations
type EnnoblementCursor ¶ added in v1.0.0
type EnnoblementCursor struct {
// contains filtered or unexported fields
}
func NewEnnoblementCursor ¶ added in v1.0.0
func (EnnoblementCursor) CreatedAt ¶ added in v1.0.0
func (ec EnnoblementCursor) CreatedAt() time.Time
func (EnnoblementCursor) Encode ¶ added in v1.0.0
func (ec EnnoblementCursor) Encode() string
func (EnnoblementCursor) ID ¶ added in v1.0.0
func (ec EnnoblementCursor) ID() int
func (EnnoblementCursor) IsZero ¶ added in v1.0.0
func (ec EnnoblementCursor) IsZero() bool
func (EnnoblementCursor) ServerKey ¶ added in v1.0.0
func (ec EnnoblementCursor) ServerKey() string
type EnnoblementSort ¶
type EnnoblementSort uint8
const ( EnnoblementSortCreatedAtASC EnnoblementSort = iota + 1 EnnoblementSortCreatedAtDESC EnnoblementSortIDASC EnnoblementSortIDDESC EnnoblementSortServerKeyASC EnnoblementSortServerKeyDESC )
func (EnnoblementSort) IsInConflict ¶ added in v1.0.0
func (s EnnoblementSort) IsInConflict(s2 EnnoblementSort) bool
IsInConflict returns true if two sorts can't be used together (e.g. EnnoblementSortIDASC and EnnoblementSortIDDESC).
func (EnnoblementSort) String ¶ added in v1.0.0
func (s EnnoblementSort) String() string
type EnnoblementWithRelations ¶ added in v0.2.0
type EnnoblementWithRelations struct {
// contains filtered or unexported fields
}
func (EnnoblementWithRelations) Ennoblement ¶ added in v1.0.0
func (e EnnoblementWithRelations) Ennoblement() Ennoblement
func (EnnoblementWithRelations) IsZero ¶ added in v1.0.0
func (e EnnoblementWithRelations) IsZero() bool
func (EnnoblementWithRelations) NewOwner ¶ added in v0.2.0
func (e EnnoblementWithRelations) NewOwner() PlayerMeta
func (EnnoblementWithRelations) NewTribe ¶ added in v0.2.0
func (e EnnoblementWithRelations) NewTribe() NullTribeMeta
func (EnnoblementWithRelations) OldOwner ¶ added in v0.2.0
func (e EnnoblementWithRelations) OldOwner() NullPlayerMeta
func (EnnoblementWithRelations) OldTribe ¶ added in v0.2.0
func (e EnnoblementWithRelations) OldTribe() NullTribeMeta
func (EnnoblementWithRelations) Village ¶ added in v0.2.0
func (e EnnoblementWithRelations) Village() VillageMeta
type Ennoblements ¶ added in v1.0.0
type Ennoblements []Ennoblement
type EnnoblementsSyncedEventPayload ¶ added in v1.0.0
type EnnoblementsSyncedEventPayload struct {
// contains filtered or unexported fields
}
func NewEnnoblementsSyncedEventPayload ¶ added in v1.0.0
func (EnnoblementsSyncedEventPayload) ServerKey ¶ added in v1.0.0
func (p EnnoblementsSyncedEventPayload) ServerKey() string
func (EnnoblementsSyncedEventPayload) ServerURL ¶ added in v1.0.0
func (p EnnoblementsSyncedEventPayload) ServerURL() *url.URL
func (EnnoblementsSyncedEventPayload) VersionCode ¶ added in v1.0.0
func (p EnnoblementsSyncedEventPayload) VersionCode() string
type EnnoblementsWithRelations ¶ added in v1.0.0
type EnnoblementsWithRelations []EnnoblementWithRelations
type ErrorPathSegment ¶ added in v1.0.0
type ErrorPathSegment struct { Model string Field string Index int // Index may be <0 and this means that it is unset }
func (ErrorPathSegment) String ¶ added in v1.0.0
func (s ErrorPathSegment) String() string
type ErrorWithParams ¶ added in v1.0.0
type ErrorWithPath ¶ added in v1.0.0
type ErrorWithPath interface { Error Path() ErrorPathSegment }
type InvalidURLError ¶ added in v1.0.0
type InvalidURLError struct {
URL string
}
func (InvalidURLError) Code ¶ added in v1.0.0
func (e InvalidURLError) Code() string
func (InvalidURLError) Error ¶ added in v1.0.0
func (e InvalidURLError) Error() string
func (InvalidURLError) Params ¶ added in v1.0.0
func (e InvalidURLError) Params() map[string]any
func (InvalidURLError) Type ¶ added in v1.0.0
func (e InvalidURLError) Type() ErrorType
type LenOutOfRangeError ¶ added in v1.0.0
func (LenOutOfRangeError) Code ¶ added in v1.0.0
func (e LenOutOfRangeError) Code() string
func (LenOutOfRangeError) Error ¶ added in v1.0.0
func (e LenOutOfRangeError) Error() string
func (LenOutOfRangeError) Params ¶ added in v1.0.0
func (e LenOutOfRangeError) Params() map[string]any
func (LenOutOfRangeError) Type ¶ added in v1.0.0
func (e LenOutOfRangeError) Type() ErrorType
type ListEnnoblementsParams ¶
type ListEnnoblementsParams struct {
// contains filtered or unexported fields
}
func NewListEnnoblementsParams ¶ added in v1.0.0
func NewListEnnoblementsParams() ListEnnoblementsParams
func (*ListEnnoblementsParams) Before ¶ added in v1.0.0
func (params *ListEnnoblementsParams) Before() NullTime
func (*ListEnnoblementsParams) Cursor ¶ added in v1.0.0
func (params *ListEnnoblementsParams) Cursor() EnnoblementCursor
func (*ListEnnoblementsParams) Limit ¶ added in v1.0.0
func (params *ListEnnoblementsParams) Limit() int
func (*ListEnnoblementsParams) PlayerIDs ¶ added in v1.0.0
func (params *ListEnnoblementsParams) PlayerIDs() []int
func (*ListEnnoblementsParams) PrependSort ¶ added in v1.0.0
func (params *ListEnnoblementsParams) PrependSort(sort []EnnoblementSort) error
func (*ListEnnoblementsParams) PrependSortString ¶ added in v1.0.0
func (params *ListEnnoblementsParams) PrependSortString(sort []string, allowed []EnnoblementSort, maxLength int) error
func (*ListEnnoblementsParams) ServerKeys ¶
func (params *ListEnnoblementsParams) ServerKeys() []string
func (*ListEnnoblementsParams) SetBefore ¶ added in v1.0.0
func (params *ListEnnoblementsParams) SetBefore(before NullTime) error
func (*ListEnnoblementsParams) SetCursor ¶ added in v1.0.0
func (params *ListEnnoblementsParams) SetCursor(cursor EnnoblementCursor) error
func (*ListEnnoblementsParams) SetEncodedCursor ¶ added in v1.0.0
func (params *ListEnnoblementsParams) SetEncodedCursor(encoded string) error
func (*ListEnnoblementsParams) SetLimit ¶ added in v1.0.0
func (params *ListEnnoblementsParams) SetLimit(limit int) error
func (*ListEnnoblementsParams) SetPlayerIDs ¶ added in v1.0.0
func (params *ListEnnoblementsParams) SetPlayerIDs(playerIDs []int) error
func (*ListEnnoblementsParams) SetServerKeys ¶ added in v1.0.0
func (params *ListEnnoblementsParams) SetServerKeys(serverKeys []string) error
func (*ListEnnoblementsParams) SetSince ¶ added in v1.0.0
func (params *ListEnnoblementsParams) SetSince(since NullTime) error
func (*ListEnnoblementsParams) SetSort ¶ added in v1.0.0
func (params *ListEnnoblementsParams) SetSort(sort []EnnoblementSort) error
func (*ListEnnoblementsParams) SetTribeIDs ¶ added in v1.0.0
func (params *ListEnnoblementsParams) SetTribeIDs(tribeIDs []int) error
func (*ListEnnoblementsParams) SetVillageIDs ¶ added in v1.0.0
func (params *ListEnnoblementsParams) SetVillageIDs(villageIDs []int) error
func (*ListEnnoblementsParams) Since ¶ added in v1.0.0
func (params *ListEnnoblementsParams) Since() NullTime
func (*ListEnnoblementsParams) Sort ¶
func (params *ListEnnoblementsParams) Sort() []EnnoblementSort
func (*ListEnnoblementsParams) TribeIDs ¶ added in v1.0.0
func (params *ListEnnoblementsParams) TribeIDs() []int
func (*ListEnnoblementsParams) VillageIDs ¶ added in v1.0.0
func (params *ListEnnoblementsParams) VillageIDs() []int
type ListEnnoblementsResult ¶ added in v1.0.0
type ListEnnoblementsResult struct {
// contains filtered or unexported fields
}
func NewListEnnoblementsResult ¶ added in v1.0.0
func NewListEnnoblementsResult(ennoblements Ennoblements, next Ennoblement) (ListEnnoblementsResult, error)
func (ListEnnoblementsResult) Ennoblements ¶ added in v1.0.0
func (res ListEnnoblementsResult) Ennoblements() Ennoblements
func (ListEnnoblementsResult) Next ¶ added in v1.0.0
func (res ListEnnoblementsResult) Next() EnnoblementCursor
func (ListEnnoblementsResult) Self ¶ added in v1.0.0
func (res ListEnnoblementsResult) Self() EnnoblementCursor
type ListEnnoblementsWithRelationsResult ¶ added in v1.0.0
type ListEnnoblementsWithRelationsResult struct {
// contains filtered or unexported fields
}
func NewListEnnoblementsWithRelationsResult ¶ added in v1.0.0
func NewListEnnoblementsWithRelationsResult( ennoblements EnnoblementsWithRelations, next EnnoblementWithRelations, ) (ListEnnoblementsWithRelationsResult, error)
func (ListEnnoblementsWithRelationsResult) Ennoblements ¶ added in v1.0.0
func (res ListEnnoblementsWithRelationsResult) Ennoblements() EnnoblementsWithRelations
func (ListEnnoblementsWithRelationsResult) Next ¶ added in v1.0.0
func (res ListEnnoblementsWithRelationsResult) Next() EnnoblementCursor
func (ListEnnoblementsWithRelationsResult) Self ¶ added in v1.0.0
func (res ListEnnoblementsWithRelationsResult) Self() EnnoblementCursor
type ListPlayerSnapshotsParams ¶ added in v0.6.0
type ListPlayerSnapshotsParams struct {
// contains filtered or unexported fields
}
func NewListPlayerSnapshotsParams ¶ added in v1.0.0
func NewListPlayerSnapshotsParams() ListPlayerSnapshotsParams
func (*ListPlayerSnapshotsParams) Cursor ¶ added in v1.0.0
func (params *ListPlayerSnapshotsParams) Cursor() PlayerSnapshotCursor
func (*ListPlayerSnapshotsParams) Limit ¶ added in v1.0.0
func (params *ListPlayerSnapshotsParams) Limit() int
func (*ListPlayerSnapshotsParams) PlayerIDs ¶ added in v0.7.0
func (params *ListPlayerSnapshotsParams) PlayerIDs() []int
func (*ListPlayerSnapshotsParams) PrependSort ¶ added in v1.0.0
func (params *ListPlayerSnapshotsParams) PrependSort(sort []PlayerSnapshotSort) error
func (*ListPlayerSnapshotsParams) PrependSortString ¶ added in v1.0.0
func (params *ListPlayerSnapshotsParams) PrependSortString( sort []string, allowed []PlayerSnapshotSort, maxLength int, ) error
func (*ListPlayerSnapshotsParams) ServerKeys ¶ added in v0.6.0
func (params *ListPlayerSnapshotsParams) ServerKeys() []string
func (*ListPlayerSnapshotsParams) SetCursor ¶ added in v1.0.0
func (params *ListPlayerSnapshotsParams) SetCursor(cursor PlayerSnapshotCursor) error
func (*ListPlayerSnapshotsParams) SetEncodedCursor ¶ added in v1.0.0
func (params *ListPlayerSnapshotsParams) SetEncodedCursor(encoded string) error
func (*ListPlayerSnapshotsParams) SetLimit ¶ added in v1.0.0
func (params *ListPlayerSnapshotsParams) SetLimit(limit int) error
func (*ListPlayerSnapshotsParams) SetPlayerIDs ¶ added in v1.0.0
func (params *ListPlayerSnapshotsParams) SetPlayerIDs(playerIDs []int) error
func (*ListPlayerSnapshotsParams) SetServerKeys ¶ added in v1.0.0
func (params *ListPlayerSnapshotsParams) SetServerKeys(serverKeys []string) error
func (*ListPlayerSnapshotsParams) SetSort ¶ added in v1.0.0
func (params *ListPlayerSnapshotsParams) SetSort(sort []PlayerSnapshotSort) error
func (*ListPlayerSnapshotsParams) Sort ¶ added in v0.7.0
func (params *ListPlayerSnapshotsParams) Sort() []PlayerSnapshotSort
type ListPlayerSnapshotsResult ¶ added in v1.0.0
type ListPlayerSnapshotsResult struct {
// contains filtered or unexported fields
}
func NewListPlayerSnapshotsResult ¶ added in v1.0.0
func NewListPlayerSnapshotsResult( snapshots PlayerSnapshots, next PlayerSnapshot, ) (ListPlayerSnapshotsResult, error)
func (ListPlayerSnapshotsResult) Next ¶ added in v1.0.0
func (res ListPlayerSnapshotsResult) Next() PlayerSnapshotCursor
func (ListPlayerSnapshotsResult) PlayerSnapshots ¶ added in v1.0.0
func (res ListPlayerSnapshotsResult) PlayerSnapshots() PlayerSnapshots
func (ListPlayerSnapshotsResult) Self ¶ added in v1.0.0
func (res ListPlayerSnapshotsResult) Self() PlayerSnapshotCursor
type ListPlayerSnapshotsWithRelationsResult ¶ added in v1.0.0
type ListPlayerSnapshotsWithRelationsResult struct {
// contains filtered or unexported fields
}
func NewListPlayerSnapshotsWithRelationsResult ¶ added in v1.0.0
func NewListPlayerSnapshotsWithRelationsResult( snapshots PlayerSnapshotsWithRelations, next PlayerSnapshotWithRelations, ) (ListPlayerSnapshotsWithRelationsResult, error)
func (ListPlayerSnapshotsWithRelationsResult) Next ¶ added in v1.0.0
func (res ListPlayerSnapshotsWithRelationsResult) Next() PlayerSnapshotCursor
func (ListPlayerSnapshotsWithRelationsResult) PlayerSnapshots ¶ added in v1.0.0
func (res ListPlayerSnapshotsWithRelationsResult) PlayerSnapshots() PlayerSnapshotsWithRelations
func (ListPlayerSnapshotsWithRelationsResult) Self ¶ added in v1.0.0
func (res ListPlayerSnapshotsWithRelationsResult) Self() PlayerSnapshotCursor
type ListPlayersParams ¶
type ListPlayersParams struct {
// contains filtered or unexported fields
}
func NewListPlayersParams ¶ added in v1.0.0
func NewListPlayersParams() ListPlayersParams
func (*ListPlayersParams) Cursor ¶ added in v1.0.0
func (params *ListPlayersParams) Cursor() PlayerCursor
func (*ListPlayersParams) Deleted ¶
func (params *ListPlayersParams) Deleted() NullBool
func (*ListPlayersParams) IDs ¶
func (params *ListPlayersParams) IDs() []int
func (*ListPlayersParams) Limit ¶ added in v1.0.0
func (params *ListPlayersParams) Limit() int
func (*ListPlayersParams) Names ¶ added in v0.12.4
func (params *ListPlayersParams) Names() []string
func (*ListPlayersParams) PrependSort ¶ added in v1.0.0
func (params *ListPlayersParams) PrependSort(sort []PlayerSort) error
func (*ListPlayersParams) PrependSortString ¶ added in v1.0.0
func (params *ListPlayersParams) PrependSortString(sort []string, allowed []PlayerSort, maxLength int) error
func (*ListPlayersParams) Q ¶ added in v1.5.0
func (params *ListPlayersParams) Q() NullString
func (*ListPlayersParams) ServerKeys ¶
func (params *ListPlayersParams) ServerKeys() []string
func (*ListPlayersParams) SetCursor ¶ added in v1.0.0
func (params *ListPlayersParams) SetCursor(cursor PlayerCursor) error
func (*ListPlayersParams) SetDeleted ¶ added in v1.0.0
func (params *ListPlayersParams) SetDeleted(deleted NullBool) error
func (*ListPlayersParams) SetEncodedCursor ¶ added in v1.0.0
func (params *ListPlayersParams) SetEncodedCursor(encoded string) error
func (*ListPlayersParams) SetIDs ¶ added in v1.0.0
func (params *ListPlayersParams) SetIDs(ids []int) error
func (*ListPlayersParams) SetLimit ¶ added in v1.0.0
func (params *ListPlayersParams) SetLimit(limit int) error
func (*ListPlayersParams) SetNames ¶ added in v1.0.0
func (params *ListPlayersParams) SetNames(names []string) error
func (*ListPlayersParams) SetQ ¶ added in v1.5.0
func (params *ListPlayersParams) SetQ(q NullString) error
func (*ListPlayersParams) SetServerKeys ¶ added in v1.0.0
func (params *ListPlayersParams) SetServerKeys(serverKeys []string) error
func (*ListPlayersParams) SetSort ¶ added in v1.0.0
func (params *ListPlayersParams) SetSort(sort []PlayerSort) error
func (*ListPlayersParams) SetTribeIDs ¶ added in v1.0.0
func (params *ListPlayersParams) SetTribeIDs(tribeIDs []int) error
func (*ListPlayersParams) SetVersionCodes ¶ added in v1.0.0
func (params *ListPlayersParams) SetVersionCodes(versionCodes []string) error
func (*ListPlayersParams) Sort ¶
func (params *ListPlayersParams) Sort() []PlayerSort
func (*ListPlayersParams) TribeIDs ¶ added in v1.0.0
func (params *ListPlayersParams) TribeIDs() []int
func (*ListPlayersParams) VersionCodes ¶ added in v0.8.3
func (params *ListPlayersParams) VersionCodes() []string
type ListPlayersResult ¶ added in v1.0.0
type ListPlayersResult struct {
// contains filtered or unexported fields
}
func NewListPlayersResult ¶ added in v1.0.0
func NewListPlayersResult(players Players, next Player) (ListPlayersResult, error)
func (ListPlayersResult) Next ¶ added in v1.0.0
func (res ListPlayersResult) Next() PlayerCursor
func (ListPlayersResult) Players ¶ added in v1.0.0
func (res ListPlayersResult) Players() Players
func (ListPlayersResult) Self ¶ added in v1.0.0
func (res ListPlayersResult) Self() PlayerCursor
type ListPlayersWithRelationsResult ¶ added in v1.0.0
type ListPlayersWithRelationsResult struct {
// contains filtered or unexported fields
}
func NewListPlayersWithRelationsResult ¶ added in v1.0.0
func NewListPlayersWithRelationsResult( players PlayersWithRelations, next PlayerWithRelations, ) (ListPlayersWithRelationsResult, error)
func (ListPlayersWithRelationsResult) Next ¶ added in v1.0.0
func (res ListPlayersWithRelationsResult) Next() PlayerCursor
func (ListPlayersWithRelationsResult) Players ¶ added in v1.0.0
func (res ListPlayersWithRelationsResult) Players() PlayersWithRelations
func (ListPlayersWithRelationsResult) Self ¶ added in v1.0.0
func (res ListPlayersWithRelationsResult) Self() PlayerCursor
type ListServerSnapshotsParams ¶ added in v1.1.0
type ListServerSnapshotsParams struct {
// contains filtered or unexported fields
}
func NewListServerSnapshotsParams ¶ added in v1.1.0
func NewListServerSnapshotsParams() ListServerSnapshotsParams
func (*ListServerSnapshotsParams) Cursor ¶ added in v1.1.0
func (params *ListServerSnapshotsParams) Cursor() ServerSnapshotCursor
func (*ListServerSnapshotsParams) Limit ¶ added in v1.1.0
func (params *ListServerSnapshotsParams) Limit() int
func (*ListServerSnapshotsParams) PrependSort ¶ added in v1.1.0
func (params *ListServerSnapshotsParams) PrependSort(sort []ServerSnapshotSort) error
func (*ListServerSnapshotsParams) PrependSortString ¶ added in v1.1.0
func (params *ListServerSnapshotsParams) PrependSortString( sort []string, allowed []ServerSnapshotSort, maxLength int, ) error
func (*ListServerSnapshotsParams) ServerKeys ¶ added in v1.1.0
func (params *ListServerSnapshotsParams) ServerKeys() []string
func (*ListServerSnapshotsParams) SetCursor ¶ added in v1.1.0
func (params *ListServerSnapshotsParams) SetCursor(cursor ServerSnapshotCursor) error
func (*ListServerSnapshotsParams) SetEncodedCursor ¶ added in v1.1.0
func (params *ListServerSnapshotsParams) SetEncodedCursor(encoded string) error
func (*ListServerSnapshotsParams) SetLimit ¶ added in v1.1.0
func (params *ListServerSnapshotsParams) SetLimit(limit int) error
func (*ListServerSnapshotsParams) SetServerKeys ¶ added in v1.1.0
func (params *ListServerSnapshotsParams) SetServerKeys(serverKeys []string) error
func (*ListServerSnapshotsParams) SetSort ¶ added in v1.1.0
func (params *ListServerSnapshotsParams) SetSort(sort []ServerSnapshotSort) error
func (*ListServerSnapshotsParams) Sort ¶ added in v1.1.0
func (params *ListServerSnapshotsParams) Sort() []ServerSnapshotSort
type ListServerSnapshotsResult ¶ added in v1.1.0
type ListServerSnapshotsResult struct {
// contains filtered or unexported fields
}
func NewListServerSnapshotsResult ¶ added in v1.1.0
func NewListServerSnapshotsResult( snapshots ServerSnapshots, next ServerSnapshot, ) (ListServerSnapshotsResult, error)
func (ListServerSnapshotsResult) Next ¶ added in v1.1.0
func (res ListServerSnapshotsResult) Next() ServerSnapshotCursor
func (ListServerSnapshotsResult) Self ¶ added in v1.1.0
func (res ListServerSnapshotsResult) Self() ServerSnapshotCursor
func (ListServerSnapshotsResult) ServerSnapshots ¶ added in v1.1.0
func (res ListServerSnapshotsResult) ServerSnapshots() ServerSnapshots
type ListServerSnapshotsWithRelationsResult ¶ added in v1.3.0
type ListServerSnapshotsWithRelationsResult struct {
// contains filtered or unexported fields
}
func NewListServerSnapshotsWithRelationsResult ¶ added in v1.3.0
func NewListServerSnapshotsWithRelationsResult( snapshots ServerSnapshotsWithRelations, next ServerSnapshotWithRelations, ) (ListServerSnapshotsWithRelationsResult, error)
func (ListServerSnapshotsWithRelationsResult) Next ¶ added in v1.3.0
func (res ListServerSnapshotsWithRelationsResult) Next() ServerSnapshotCursor
func (ListServerSnapshotsWithRelationsResult) Self ¶ added in v1.3.0
func (res ListServerSnapshotsWithRelationsResult) Self() ServerSnapshotCursor
func (ListServerSnapshotsWithRelationsResult) ServerSnapshots ¶ added in v1.3.0
func (res ListServerSnapshotsWithRelationsResult) ServerSnapshots() ServerSnapshotsWithRelations
type ListServersParams ¶
type ListServersParams struct {
// contains filtered or unexported fields
}
func NewListServersParams ¶ added in v1.0.0
func NewListServersParams() ListServersParams
func (*ListServersParams) Cursor ¶ added in v1.0.0
func (params *ListServersParams) Cursor() ServerCursor
func (*ListServersParams) Keys ¶
func (params *ListServersParams) Keys() []string
func (*ListServersParams) Limit ¶ added in v1.0.0
func (params *ListServersParams) Limit() int
func (*ListServersParams) Open ¶
func (params *ListServersParams) Open() NullBool
func (*ListServersParams) PlayerSnapshotsCreatedAtLT ¶ added in v0.3.0
func (params *ListServersParams) PlayerSnapshotsCreatedAtLT() NullTime
func (*ListServersParams) SetCursor ¶ added in v1.0.0
func (params *ListServersParams) SetCursor(cursor ServerCursor) error
func (*ListServersParams) SetEncodedCursor ¶ added in v1.0.0
func (params *ListServersParams) SetEncodedCursor(encoded string) error
func (*ListServersParams) SetKeys ¶ added in v1.0.0
func (params *ListServersParams) SetKeys(keys []string) error
func (*ListServersParams) SetLimit ¶ added in v1.0.0
func (params *ListServersParams) SetLimit(limit int) error
func (*ListServersParams) SetOpen ¶ added in v1.0.0
func (params *ListServersParams) SetOpen(open NullBool) error
func (*ListServersParams) SetPlayerSnapshotsCreatedAtLT ¶ added in v1.0.0
func (params *ListServersParams) SetPlayerSnapshotsCreatedAtLT(playerSnapshotsCreatedAtLT NullTime) error
func (*ListServersParams) SetSnapshotCreatedAtLT ¶ added in v1.1.0
func (params *ListServersParams) SetSnapshotCreatedAtLT(snapshotCreatedAtLT NullTime) error
func (*ListServersParams) SetSort ¶ added in v1.0.0
func (params *ListServersParams) SetSort(sort []ServerSort) error
func (*ListServersParams) SetSpecial ¶ added in v1.0.0
func (params *ListServersParams) SetSpecial(special NullBool) error
func (*ListServersParams) SetTribeSnapshotsCreatedAtLT ¶ added in v1.0.0
func (params *ListServersParams) SetTribeSnapshotsCreatedAtLT(tribeSnapshotsCreatedAtLT NullTime) error
func (*ListServersParams) SetVersionCodes ¶ added in v1.0.0
func (params *ListServersParams) SetVersionCodes(versionCodes []string) error
func (*ListServersParams) SnapshotCreatedAtLT ¶ added in v1.1.0
func (params *ListServersParams) SnapshotCreatedAtLT() NullTime
func (*ListServersParams) Sort ¶ added in v1.0.0
func (params *ListServersParams) Sort() []ServerSort
func (*ListServersParams) Special ¶
func (params *ListServersParams) Special() NullBool
func (*ListServersParams) TribeSnapshotsCreatedAtLT ¶ added in v0.3.0
func (params *ListServersParams) TribeSnapshotsCreatedAtLT() NullTime
func (*ListServersParams) VersionCodes ¶
func (params *ListServersParams) VersionCodes() []string
type ListServersResult ¶ added in v1.0.0
type ListServersResult struct {
// contains filtered or unexported fields
}
func NewListServersResult ¶ added in v1.0.0
func NewListServersResult(servers Servers, next Server) (ListServersResult, error)
func (ListServersResult) Next ¶ added in v1.0.0
func (res ListServersResult) Next() ServerCursor
func (ListServersResult) Self ¶ added in v1.0.0
func (res ListServersResult) Self() ServerCursor
func (ListServersResult) Servers ¶ added in v1.0.0
func (res ListServersResult) Servers() Servers
type ListTribeChangesParams ¶ added in v0.7.5
type ListTribeChangesParams struct {
// contains filtered or unexported fields
}
func NewListTribeChangesParams ¶ added in v1.0.0
func NewListTribeChangesParams() ListTribeChangesParams
func (*ListTribeChangesParams) Before ¶ added in v1.0.0
func (params *ListTribeChangesParams) Before() NullTime
func (*ListTribeChangesParams) Cursor ¶ added in v1.0.0
func (params *ListTribeChangesParams) Cursor() TribeChangeCursor
func (*ListTribeChangesParams) Limit ¶ added in v1.0.0
func (params *ListTribeChangesParams) Limit() int
func (*ListTribeChangesParams) PlayerIDs ¶ added in v0.7.5
func (params *ListTribeChangesParams) PlayerIDs() []int
func (*ListTribeChangesParams) PrependSort ¶ added in v1.0.0
func (params *ListTribeChangesParams) PrependSort(sort []TribeChangeSort) error
func (*ListTribeChangesParams) PrependSortString ¶ added in v1.0.0
func (params *ListTribeChangesParams) PrependSortString( sort []string, allowed []TribeChangeSort, maxLength int, ) error
func (*ListTribeChangesParams) ServerKeys ¶ added in v0.7.5
func (params *ListTribeChangesParams) ServerKeys() []string
func (*ListTribeChangesParams) SetBefore ¶ added in v1.0.0
func (params *ListTribeChangesParams) SetBefore(before NullTime) error
func (*ListTribeChangesParams) SetCursor ¶ added in v1.0.0
func (params *ListTribeChangesParams) SetCursor(cursor TribeChangeCursor) error
func (*ListTribeChangesParams) SetEncodedCursor ¶ added in v1.0.0
func (params *ListTribeChangesParams) SetEncodedCursor(encoded string) error
func (*ListTribeChangesParams) SetLimit ¶ added in v1.0.0
func (params *ListTribeChangesParams) SetLimit(limit int) error
func (*ListTribeChangesParams) SetPlayerIDs ¶ added in v1.0.0
func (params *ListTribeChangesParams) SetPlayerIDs(playerIDs []int) error
func (*ListTribeChangesParams) SetServerKeys ¶ added in v1.0.0
func (params *ListTribeChangesParams) SetServerKeys(serverKeys []string) error
func (*ListTribeChangesParams) SetSince ¶ added in v1.0.0
func (params *ListTribeChangesParams) SetSince(since NullTime) error
func (*ListTribeChangesParams) SetSort ¶ added in v1.0.0
func (params *ListTribeChangesParams) SetSort(sort []TribeChangeSort) error
func (*ListTribeChangesParams) SetTribeIDs ¶ added in v1.0.0
func (params *ListTribeChangesParams) SetTribeIDs(tribeIDs []int) error
func (*ListTribeChangesParams) Since ¶ added in v1.0.0
func (params *ListTribeChangesParams) Since() NullTime
func (*ListTribeChangesParams) Sort ¶ added in v0.7.5
func (params *ListTribeChangesParams) Sort() []TribeChangeSort
func (*ListTribeChangesParams) TribeIDs ¶ added in v0.11.0
func (params *ListTribeChangesParams) TribeIDs() []int
type ListTribeChangesResult ¶ added in v1.0.0
type ListTribeChangesResult struct {
// contains filtered or unexported fields
}
func NewListTribeChangesResult ¶ added in v1.0.0
func NewListTribeChangesResult(tribeChanges TribeChanges, next TribeChange) (ListTribeChangesResult, error)
func (ListTribeChangesResult) Next ¶ added in v1.0.0
func (res ListTribeChangesResult) Next() TribeChangeCursor
func (ListTribeChangesResult) Self ¶ added in v1.0.0
func (res ListTribeChangesResult) Self() TribeChangeCursor
func (ListTribeChangesResult) TribeChanges ¶ added in v1.0.0
func (res ListTribeChangesResult) TribeChanges() TribeChanges
type ListTribeChangesWithRelationsResult ¶ added in v1.0.0
type ListTribeChangesWithRelationsResult struct {
// contains filtered or unexported fields
}
func NewListTribeChangesWithRelationsResult ¶ added in v1.0.0
func NewListTribeChangesWithRelationsResult( tribeChanges TribeChangesWithRelations, next TribeChangeWithRelations, ) (ListTribeChangesWithRelationsResult, error)
func (ListTribeChangesWithRelationsResult) Next ¶ added in v1.0.0
func (res ListTribeChangesWithRelationsResult) Next() TribeChangeCursor
func (ListTribeChangesWithRelationsResult) Self ¶ added in v1.0.0
func (res ListTribeChangesWithRelationsResult) Self() TribeChangeCursor
func (ListTribeChangesWithRelationsResult) TribeChanges ¶ added in v1.0.0
func (res ListTribeChangesWithRelationsResult) TribeChanges() TribeChangesWithRelations
type ListTribeSnapshotsParams ¶ added in v0.6.0
type ListTribeSnapshotsParams struct {
// contains filtered or unexported fields
}
func NewListTribeSnapshotsParams ¶ added in v1.0.0
func NewListTribeSnapshotsParams() ListTribeSnapshotsParams
func (*ListTribeSnapshotsParams) Cursor ¶ added in v1.0.0
func (params *ListTribeSnapshotsParams) Cursor() TribeSnapshotCursor
func (*ListTribeSnapshotsParams) Limit ¶ added in v1.0.0
func (params *ListTribeSnapshotsParams) Limit() int
func (*ListTribeSnapshotsParams) PrependSort ¶ added in v1.0.0
func (params *ListTribeSnapshotsParams) PrependSort(sort []TribeSnapshotSort) error
func (*ListTribeSnapshotsParams) PrependSortString ¶ added in v1.0.0
func (params *ListTribeSnapshotsParams) PrependSortString( sort []string, allowed []TribeSnapshotSort, maxLength int, ) error
func (*ListTribeSnapshotsParams) ServerKeys ¶ added in v0.6.0
func (params *ListTribeSnapshotsParams) ServerKeys() []string
func (*ListTribeSnapshotsParams) SetCursor ¶ added in v1.0.0
func (params *ListTribeSnapshotsParams) SetCursor(cursor TribeSnapshotCursor) error
func (*ListTribeSnapshotsParams) SetEncodedCursor ¶ added in v1.0.0
func (params *ListTribeSnapshotsParams) SetEncodedCursor(encoded string) error
func (*ListTribeSnapshotsParams) SetLimit ¶ added in v1.0.0
func (params *ListTribeSnapshotsParams) SetLimit(limit int) error
func (*ListTribeSnapshotsParams) SetServerKeys ¶ added in v1.0.0
func (params *ListTribeSnapshotsParams) SetServerKeys(serverKeys []string) error
func (*ListTribeSnapshotsParams) SetSort ¶ added in v1.0.0
func (params *ListTribeSnapshotsParams) SetSort(sort []TribeSnapshotSort) error
func (*ListTribeSnapshotsParams) SetTribeIDs ¶ added in v1.0.0
func (params *ListTribeSnapshotsParams) SetTribeIDs(tribeIDs []int) error
func (*ListTribeSnapshotsParams) Sort ¶ added in v0.10.0
func (params *ListTribeSnapshotsParams) Sort() []TribeSnapshotSort
func (*ListTribeSnapshotsParams) TribeIDs ¶ added in v0.10.0
func (params *ListTribeSnapshotsParams) TribeIDs() []int
type ListTribeSnapshotsResult ¶ added in v1.0.0
type ListTribeSnapshotsResult struct {
// contains filtered or unexported fields
}
func NewListTribeSnapshotsResult ¶ added in v1.0.0
func NewListTribeSnapshotsResult( snapshots TribeSnapshots, next TribeSnapshot, ) (ListTribeSnapshotsResult, error)
func (ListTribeSnapshotsResult) Next ¶ added in v1.0.0
func (res ListTribeSnapshotsResult) Next() TribeSnapshotCursor
func (ListTribeSnapshotsResult) Self ¶ added in v1.0.0
func (res ListTribeSnapshotsResult) Self() TribeSnapshotCursor
func (ListTribeSnapshotsResult) TribeSnapshots ¶ added in v1.0.0
func (res ListTribeSnapshotsResult) TribeSnapshots() TribeSnapshots
type ListTribeSnapshotsWithRelationsResult ¶ added in v1.0.0
type ListTribeSnapshotsWithRelationsResult struct {
// contains filtered or unexported fields
}
func NewListTribeSnapshotsWithRelationsResult ¶ added in v1.0.0
func NewListTribeSnapshotsWithRelationsResult( snapshots TribeSnapshotsWithRelations, next TribeSnapshotWithRelations, ) (ListTribeSnapshotsWithRelationsResult, error)
func (ListTribeSnapshotsWithRelationsResult) Next ¶ added in v1.0.0
func (res ListTribeSnapshotsWithRelationsResult) Next() TribeSnapshotCursor
func (ListTribeSnapshotsWithRelationsResult) Self ¶ added in v1.0.0
func (res ListTribeSnapshotsWithRelationsResult) Self() TribeSnapshotCursor
func (ListTribeSnapshotsWithRelationsResult) TribeSnapshots ¶ added in v1.0.0
func (res ListTribeSnapshotsWithRelationsResult) TribeSnapshots() TribeSnapshotsWithRelations
type ListTribesParams ¶
type ListTribesParams struct {
// contains filtered or unexported fields
}
func NewListTribesParams ¶ added in v1.0.0
func NewListTribesParams() ListTribesParams
func (*ListTribesParams) Cursor ¶ added in v1.0.0
func (params *ListTribesParams) Cursor() TribeCursor
func (*ListTribesParams) Deleted ¶
func (params *ListTribesParams) Deleted() NullBool
func (*ListTribesParams) IDs ¶
func (params *ListTribesParams) IDs() []int
func (*ListTribesParams) Limit ¶ added in v1.0.0
func (params *ListTribesParams) Limit() int
func (*ListTribesParams) PrependSort ¶ added in v1.8.0
func (params *ListTribesParams) PrependSort(sort []TribeSort) error
func (*ListTribesParams) PrependSortString ¶ added in v1.0.0
func (params *ListTribesParams) PrependSortString(sort []string, allowed []TribeSort, maxLength int) error
func (*ListTribesParams) Q ¶ added in v1.5.0
func (params *ListTribesParams) Q() NullString
func (*ListTribesParams) ServerKeys ¶
func (params *ListTribesParams) ServerKeys() []string
func (*ListTribesParams) SetCursor ¶ added in v1.0.0
func (params *ListTribesParams) SetCursor(cursor TribeCursor) error
func (*ListTribesParams) SetDeleted ¶ added in v1.0.0
func (params *ListTribesParams) SetDeleted(deleted NullBool) error
func (*ListTribesParams) SetEncodedCursor ¶ added in v1.0.0
func (params *ListTribesParams) SetEncodedCursor(encoded string) error
func (*ListTribesParams) SetIDs ¶ added in v1.0.0
func (params *ListTribesParams) SetIDs(ids []int) error
func (*ListTribesParams) SetLimit ¶ added in v1.0.0
func (params *ListTribesParams) SetLimit(limit int) error
func (*ListTribesParams) SetQ ¶ added in v1.5.0
func (params *ListTribesParams) SetQ(q NullString) error
func (*ListTribesParams) SetServerKeys ¶ added in v1.0.0
func (params *ListTribesParams) SetServerKeys(serverKeys []string) error
func (*ListTribesParams) SetSort ¶ added in v1.0.0
func (params *ListTribesParams) SetSort(sort []TribeSort) error
func (*ListTribesParams) SetTags ¶ added in v1.0.0
func (params *ListTribesParams) SetTags(tags []string) error
func (*ListTribesParams) SetVersionCodes ¶ added in v1.8.0
func (params *ListTribesParams) SetVersionCodes(versionCodes []string) error
func (*ListTribesParams) Sort ¶
func (params *ListTribesParams) Sort() []TribeSort
func (*ListTribesParams) Tags ¶
func (params *ListTribesParams) Tags() []string
func (*ListTribesParams) VersionCodes ¶ added in v1.8.0
func (params *ListTribesParams) VersionCodes() []string
type ListTribesResult ¶ added in v1.0.0
type ListTribesResult struct {
// contains filtered or unexported fields
}
func NewListTribesResult ¶ added in v1.0.0
func NewListTribesResult(tribes Tribes, next Tribe) (ListTribesResult, error)
func (ListTribesResult) Next ¶ added in v1.0.0
func (res ListTribesResult) Next() TribeCursor
func (ListTribesResult) Self ¶ added in v1.0.0
func (res ListTribesResult) Self() TribeCursor
func (ListTribesResult) Tribes ¶ added in v1.0.0
func (res ListTribesResult) Tribes() Tribes
type ListTribesWithRelationsResult ¶ added in v1.8.0
type ListTribesWithRelationsResult struct {
// contains filtered or unexported fields
}
func NewListTribesWithRelationsResult ¶ added in v1.8.0
func NewListTribesWithRelationsResult( tribes TribesWithRelations, next TribeWithRelations, ) (ListTribesWithRelationsResult, error)
func (ListTribesWithRelationsResult) Next ¶ added in v1.8.0
func (res ListTribesWithRelationsResult) Next() TribeCursor
func (ListTribesWithRelationsResult) Self ¶ added in v1.8.0
func (res ListTribesWithRelationsResult) Self() TribeCursor
func (ListTribesWithRelationsResult) Tribes ¶ added in v1.8.0
func (res ListTribesWithRelationsResult) Tribes() TribesWithRelations
type ListVersionsParams ¶
type ListVersionsParams struct {
// contains filtered or unexported fields
}
func NewListVersionsParams ¶ added in v1.0.0
func NewListVersionsParams() ListVersionsParams
func (*ListVersionsParams) Codes ¶ added in v1.0.0
func (params *ListVersionsParams) Codes() []string
func (*ListVersionsParams) Cursor ¶ added in v1.0.0
func (params *ListVersionsParams) Cursor() VersionCursor
func (*ListVersionsParams) Limit ¶ added in v1.0.0
func (params *ListVersionsParams) Limit() int
func (*ListVersionsParams) SetCodes ¶ added in v1.0.0
func (params *ListVersionsParams) SetCodes(codes []string) error
func (*ListVersionsParams) SetCursor ¶ added in v1.0.0
func (params *ListVersionsParams) SetCursor(vc VersionCursor) error
func (*ListVersionsParams) SetEncodedCursor ¶ added in v1.0.0
func (params *ListVersionsParams) SetEncodedCursor(encoded string) error
func (*ListVersionsParams) SetLimit ¶ added in v1.0.0
func (params *ListVersionsParams) SetLimit(limit int) error
func (*ListVersionsParams) SetSort ¶ added in v1.0.0
func (params *ListVersionsParams) SetSort(sort []VersionSort) error
func (*ListVersionsParams) Sort ¶ added in v1.0.0
func (params *ListVersionsParams) Sort() []VersionSort
type ListVersionsResult ¶ added in v1.0.0
type ListVersionsResult struct {
// contains filtered or unexported fields
}
func NewListVersionsResult ¶ added in v1.0.0
func NewListVersionsResult(versions Versions, next Version) (ListVersionsResult, error)
func (ListVersionsResult) Next ¶ added in v1.0.0
func (res ListVersionsResult) Next() VersionCursor
func (ListVersionsResult) Self ¶ added in v1.0.0
func (res ListVersionsResult) Self() VersionCursor
func (ListVersionsResult) Versions ¶ added in v1.0.0
func (res ListVersionsResult) Versions() Versions
type ListVillagesParams ¶
type ListVillagesParams struct {
// contains filtered or unexported fields
}
func NewListVillagesParams ¶ added in v1.0.0
func NewListVillagesParams() ListVillagesParams
func (*ListVillagesParams) Coords ¶ added in v0.12.3
func (params *ListVillagesParams) Coords() []Coords
func (*ListVillagesParams) Cursor ¶ added in v1.0.0
func (params *ListVillagesParams) Cursor() VillageCursor
func (*ListVillagesParams) IDs ¶
func (params *ListVillagesParams) IDs() []int
func (*ListVillagesParams) Limit ¶ added in v1.0.0
func (params *ListVillagesParams) Limit() int
func (*ListVillagesParams) PlayerIDs ¶ added in v1.0.0
func (params *ListVillagesParams) PlayerIDs() []int
func (*ListVillagesParams) ServerKeys ¶
func (params *ListVillagesParams) ServerKeys() []string
func (*ListVillagesParams) SetCoords ¶ added in v1.0.0
func (params *ListVillagesParams) SetCoords(coords []Coords) error
func (*ListVillagesParams) SetCoordsString ¶ added in v1.0.0
func (params *ListVillagesParams) SetCoordsString(rawCoords []string) error
func (*ListVillagesParams) SetCursor ¶ added in v1.0.0
func (params *ListVillagesParams) SetCursor(cursor VillageCursor) error
func (*ListVillagesParams) SetEncodedCursor ¶ added in v1.0.0
func (params *ListVillagesParams) SetEncodedCursor(encoded string) error
func (*ListVillagesParams) SetIDs ¶ added in v1.0.0
func (params *ListVillagesParams) SetIDs(ids []int) error
func (*ListVillagesParams) SetLimit ¶ added in v1.0.0
func (params *ListVillagesParams) SetLimit(limit int) error
func (*ListVillagesParams) SetPlayerIDs ¶ added in v1.0.0
func (params *ListVillagesParams) SetPlayerIDs(playerIDs []int) error
func (*ListVillagesParams) SetServerKeys ¶ added in v1.0.0
func (params *ListVillagesParams) SetServerKeys(serverKeys []string) error
func (*ListVillagesParams) SetSort ¶ added in v1.0.0
func (params *ListVillagesParams) SetSort(sort []VillageSort) error
func (*ListVillagesParams) SetTribeIDs ¶ added in v1.0.0
func (params *ListVillagesParams) SetTribeIDs(tribeIDs []int) error
func (*ListVillagesParams) Sort ¶ added in v1.0.0
func (params *ListVillagesParams) Sort() []VillageSort
func (*ListVillagesParams) TribeIDs ¶ added in v1.0.0
func (params *ListVillagesParams) TribeIDs() []int
type ListVillagesResult ¶ added in v1.0.0
type ListVillagesResult struct {
// contains filtered or unexported fields
}
func NewListVillagesResult ¶ added in v1.0.0
func NewListVillagesResult(villages Villages, next Village) (ListVillagesResult, error)
func (ListVillagesResult) Next ¶ added in v1.0.0
func (res ListVillagesResult) Next() VillageCursor
func (ListVillagesResult) Self ¶ added in v1.0.0
func (res ListVillagesResult) Self() VillageCursor
func (ListVillagesResult) Villages ¶ added in v1.0.0
func (res ListVillagesResult) Villages() Villages
type ListVillagesWithRelationsResult ¶ added in v1.0.0
type ListVillagesWithRelationsResult struct {
// contains filtered or unexported fields
}
func NewListVillagesWithRelationsResult ¶ added in v1.0.0
func NewListVillagesWithRelationsResult( villages VillagesWithRelations, next VillageWithRelations, ) (ListVillagesWithRelationsResult, error)
func (ListVillagesWithRelationsResult) Next ¶ added in v1.0.0
func (res ListVillagesWithRelationsResult) Next() VillageCursor
func (ListVillagesWithRelationsResult) Self ¶ added in v1.0.0
func (res ListVillagesWithRelationsResult) Self() VillageCursor
func (ListVillagesWithRelationsResult) Villages ¶ added in v1.0.0
func (res ListVillagesWithRelationsResult) Villages() VillagesWithRelations
type MaxLessEqualError ¶ added in v1.0.0
func (MaxLessEqualError[T]) Code ¶ added in v1.0.0
func (e MaxLessEqualError[T]) Code() string
func (MaxLessEqualError[T]) Error ¶ added in v1.0.0
func (e MaxLessEqualError[T]) Error() string
func (MaxLessEqualError[T]) Params ¶ added in v1.0.0
func (e MaxLessEqualError[T]) Params() map[string]any
func (MaxLessEqualError[T]) Type ¶ added in v1.0.0
func (e MaxLessEqualError[T]) Type() ErrorType
type MinGreaterEqualError ¶ added in v1.0.0
func (MinGreaterEqualError[T]) Code ¶ added in v1.0.0
func (e MinGreaterEqualError[T]) Code() string
func (MinGreaterEqualError[T]) Error ¶ added in v1.0.0
func (e MinGreaterEqualError[T]) Error() string
func (MinGreaterEqualError[T]) Params ¶ added in v1.0.0
func (e MinGreaterEqualError[T]) Params() map[string]any
func (MinGreaterEqualError[T]) Type ¶ added in v1.0.0
func (e MinGreaterEqualError[T]) Type() ErrorType
type NullBuildingInfo ¶
type NullBuildingInfo = NullValue[BuildingInfo]
type NullPlayerMeta ¶ added in v0.2.0
type NullPlayerMeta NullValue[PlayerMeta]
func (NullPlayerMeta) IsZero ¶ added in v1.0.0
func (p NullPlayerMeta) IsZero() bool
func (NullPlayerMeta) WithRelations ¶ added in v1.0.0
func (p NullPlayerMeta) WithRelations(tribe NullTribeMeta) NullPlayerMetaWithRelations
type NullPlayerMetaWithRelations ¶ added in v0.2.0
type NullPlayerMetaWithRelations NullValue[PlayerMetaWithRelations]
func (NullPlayerMetaWithRelations) IsZero ¶ added in v1.0.0
func (p NullPlayerMetaWithRelations) IsZero() bool
type NullServerConfig ¶
type NullServerConfig = NullValue[ServerConfig]
type NullString ¶ added in v1.0.0
type NullTribeMeta ¶ added in v0.2.0
func (NullTribeMeta) IsZero ¶ added in v1.0.0
func (t NullTribeMeta) IsZero() bool
type NullUnitInfo ¶
type OpponentsDefeated ¶
type OpponentsDefeated struct {
// contains filtered or unexported fields
}
func NewOpponentsDefeated ¶ added in v1.0.0
func (OpponentsDefeated) RankAtt ¶
func (o OpponentsDefeated) RankAtt() int
func (OpponentsDefeated) RankDef ¶
func (o OpponentsDefeated) RankDef() int
func (OpponentsDefeated) RankSup ¶
func (o OpponentsDefeated) RankSup() int
func (OpponentsDefeated) RankTotal ¶
func (o OpponentsDefeated) RankTotal() int
func (OpponentsDefeated) ScoreAtt ¶
func (o OpponentsDefeated) ScoreAtt() int
func (OpponentsDefeated) ScoreDef ¶
func (o OpponentsDefeated) ScoreDef() int
func (OpponentsDefeated) ScoreSup ¶
func (o OpponentsDefeated) ScoreSup() int
func (OpponentsDefeated) ScoreTotal ¶
func (o OpponentsDefeated) ScoreTotal() int
type Player ¶
type Player struct {
// contains filtered or unexported fields
}
func UnmarshalPlayerFromDatabase ¶ added in v1.0.0
func UnmarshalPlayerFromDatabase( id int, serverKey string, name string, numVillages int, points int, rank int, tribeID int, od OpponentsDefeated, rawProfileURL string, bestRank int, bestRankAt time.Time, mostPoints int, mostPointsAt time.Time, mostVillages int, mostVillagesAt time.Time, lastActivityAt time.Time, createdAt time.Time, deletedAt time.Time, ) (Player, error)
UnmarshalPlayerFromDatabase unmarshals Player from the database.
It should be used only for unmarshalling from the database! You can't use UnmarshalPlayerFromDatabase as constructor - It may put domain into the invalid state!
func (Player) Base ¶ added in v1.0.0
func (p Player) Base() BasePlayer
func (Player) BestRankAt ¶ added in v0.4.5
func (Player) LastActivityAt ¶ added in v0.4.5
func (Player) Meta ¶ added in v1.0.0
func (p Player) Meta() PlayerMeta
func (Player) MostPoints ¶ added in v0.4.5
func (Player) MostPointsAt ¶ added in v0.4.5
func (Player) MostVillages ¶ added in v0.4.5
func (Player) MostVillagesAt ¶ added in v0.4.5
func (Player) NumVillages ¶ added in v0.2.0
func (Player) OD ¶ added in v1.0.0
func (p Player) OD() OpponentsDefeated
func (Player) ProfileURL ¶ added in v0.2.0
func (Player) ToCursor ¶ added in v1.0.0
func (p Player) ToCursor() (PlayerCursor, error)
func (Player) WithRelations ¶ added in v1.0.0
func (p Player) WithRelations(server ServerMeta, tribe NullTribeMeta) PlayerWithRelations
type PlayerCursor ¶ added in v1.0.0
type PlayerCursor struct {
// contains filtered or unexported fields
}
func NewPlayerCursor ¶ added in v1.0.0
func (PlayerCursor) DeletedAt ¶ added in v1.0.0
func (pc PlayerCursor) DeletedAt() time.Time
func (PlayerCursor) Encode ¶ added in v1.0.0
func (pc PlayerCursor) Encode() string
func (PlayerCursor) ID ¶ added in v1.0.0
func (pc PlayerCursor) ID() int
func (PlayerCursor) IsZero ¶ added in v1.0.0
func (pc PlayerCursor) IsZero() bool
func (PlayerCursor) MostPoints ¶ added in v1.4.0
func (pc PlayerCursor) MostPoints() int
func (PlayerCursor) ODScoreAtt ¶ added in v1.0.0
func (pc PlayerCursor) ODScoreAtt() int
func (PlayerCursor) ODScoreDef ¶ added in v1.0.0
func (pc PlayerCursor) ODScoreDef() int
func (PlayerCursor) ODScoreSup ¶ added in v1.0.0
func (pc PlayerCursor) ODScoreSup() int
func (PlayerCursor) ODScoreTotal ¶ added in v1.0.0
func (pc PlayerCursor) ODScoreTotal() int
func (PlayerCursor) Points ¶ added in v1.0.0
func (pc PlayerCursor) Points() int
func (PlayerCursor) ServerKey ¶ added in v1.0.0
func (pc PlayerCursor) ServerKey() string
type PlayerMeta ¶ added in v0.2.0
type PlayerMeta struct {
// contains filtered or unexported fields
}
func UnmarshalPlayerMetaFromDatabase ¶ added in v1.0.0
func UnmarshalPlayerMetaFromDatabase(id int, name string, rawProfileURL string) (PlayerMeta, error)
UnmarshalPlayerMetaFromDatabase unmarshals PlayerMeta from the database.
It should be used only for unmarshalling from the database! You can't use UnmarshalPlayerMetaFromDatabase as constructor - It may put domain into the invalid state!
func (PlayerMeta) ID ¶ added in v0.2.0
func (p PlayerMeta) ID() int
func (PlayerMeta) IsZero ¶ added in v1.0.0
func (p PlayerMeta) IsZero() bool
func (PlayerMeta) Name ¶ added in v0.2.0
func (p PlayerMeta) Name() string
func (PlayerMeta) ProfileURL ¶ added in v0.2.0
func (p PlayerMeta) ProfileURL() *url.URL
func (PlayerMeta) WithRelations ¶ added in v1.0.0
func (p PlayerMeta) WithRelations(tribe NullTribeMeta) PlayerMetaWithRelations
type PlayerMetaWithRelations ¶ added in v0.2.0
type PlayerMetaWithRelations struct {
// contains filtered or unexported fields
}
func (PlayerMetaWithRelations) IsZero ¶ added in v1.0.0
func (p PlayerMetaWithRelations) IsZero() bool
func (PlayerMetaWithRelations) Player ¶ added in v1.0.0
func (p PlayerMetaWithRelations) Player() PlayerMeta
func (PlayerMetaWithRelations) Tribe ¶ added in v0.2.0
func (p PlayerMetaWithRelations) Tribe() NullTribeMeta
type PlayerNotFoundError ¶
func (PlayerNotFoundError) Code ¶
func (e PlayerNotFoundError) Code() string
func (PlayerNotFoundError) Error ¶
func (e PlayerNotFoundError) Error() string
func (PlayerNotFoundError) Params ¶ added in v1.0.0
func (e PlayerNotFoundError) Params() map[string]any
func (PlayerNotFoundError) Type ¶ added in v1.0.0
func (e PlayerNotFoundError) Type() ErrorType
type PlayerSnapshot ¶ added in v0.3.0
type PlayerSnapshot struct {
// contains filtered or unexported fields
}
func UnmarshalPlayerSnapshotFromDatabase ¶ added in v1.0.0
func UnmarshalPlayerSnapshotFromDatabase( id int, playerID int, serverKey string, numVillages int, points int, rank int, tribeID int, od OpponentsDefeated, date time.Time, createdAt time.Time, ) (PlayerSnapshot, error)
UnmarshalPlayerSnapshotFromDatabase unmarshals PlayerSnapshot from the database.
It should be used only for unmarshalling from the database! You can't use UnmarshalPlayerSnapshotFromDatabase as constructor - It may put domain into the invalid state!
func (PlayerSnapshot) CreatedAt ¶ added in v0.3.0
func (ps PlayerSnapshot) CreatedAt() time.Time
func (PlayerSnapshot) Date ¶ added in v0.3.0
func (ps PlayerSnapshot) Date() time.Time
func (PlayerSnapshot) ID ¶ added in v0.3.0
func (ps PlayerSnapshot) ID() int
func (PlayerSnapshot) IsZero ¶ added in v1.0.0
func (ps PlayerSnapshot) IsZero() bool
func (PlayerSnapshot) NumVillages ¶ added in v0.3.0
func (ps PlayerSnapshot) NumVillages() int
func (PlayerSnapshot) OD ¶ added in v1.0.0
func (ps PlayerSnapshot) OD() OpponentsDefeated
func (PlayerSnapshot) PlayerID ¶ added in v0.3.0
func (ps PlayerSnapshot) PlayerID() int
func (PlayerSnapshot) Points ¶ added in v0.3.0
func (ps PlayerSnapshot) Points() int
func (PlayerSnapshot) Rank ¶ added in v0.3.0
func (ps PlayerSnapshot) Rank() int
func (PlayerSnapshot) ServerKey ¶ added in v0.3.0
func (ps PlayerSnapshot) ServerKey() string
func (PlayerSnapshot) ToCursor ¶ added in v1.0.0
func (ps PlayerSnapshot) ToCursor() (PlayerSnapshotCursor, error)
func (PlayerSnapshot) TribeID ¶ added in v0.3.0
func (ps PlayerSnapshot) TribeID() int
func (PlayerSnapshot) WithRelations ¶ added in v1.0.0
func (ps PlayerSnapshot) WithRelations(player PlayerMeta, tribe NullTribeMeta) PlayerSnapshotWithRelations
type PlayerSnapshotCursor ¶ added in v1.0.0
type PlayerSnapshotCursor struct {
// contains filtered or unexported fields
}
func NewPlayerSnapshotCursor ¶ added in v1.0.0
func (PlayerSnapshotCursor) Date ¶ added in v1.0.0
func (psc PlayerSnapshotCursor) Date() time.Time
func (PlayerSnapshotCursor) Encode ¶ added in v1.0.0
func (psc PlayerSnapshotCursor) Encode() string
func (PlayerSnapshotCursor) ID ¶ added in v1.0.0
func (psc PlayerSnapshotCursor) ID() int
func (PlayerSnapshotCursor) IsZero ¶ added in v1.0.0
func (psc PlayerSnapshotCursor) IsZero() bool
func (PlayerSnapshotCursor) ServerKey ¶ added in v1.0.0
func (psc PlayerSnapshotCursor) ServerKey() string
type PlayerSnapshotSort ¶ added in v0.7.0
type PlayerSnapshotSort uint8
const ( PlayerSnapshotSortDateASC PlayerSnapshotSort = iota + 1 PlayerSnapshotSortDateDESC PlayerSnapshotSortIDASC PlayerSnapshotSortIDDESC PlayerSnapshotSortServerKeyASC PlayerSnapshotSortServerKeyDESC )
func (PlayerSnapshotSort) IsInConflict ¶ added in v1.0.0
func (s PlayerSnapshotSort) IsInConflict(s2 PlayerSnapshotSort) bool
IsInConflict returns true if two sorts can't be used together (e.g. PlayerSnapshotSortIDASC and PlayerSnapshotSortIDDESC).
func (PlayerSnapshotSort) String ¶ added in v1.0.0
func (s PlayerSnapshotSort) String() string
type PlayerSnapshotWithRelations ¶ added in v0.7.0
type PlayerSnapshotWithRelations struct {
// contains filtered or unexported fields
}
func (PlayerSnapshotWithRelations) IsZero ¶ added in v1.0.0
func (ps PlayerSnapshotWithRelations) IsZero() bool
func (PlayerSnapshotWithRelations) Player ¶ added in v1.0.0
func (ps PlayerSnapshotWithRelations) Player() PlayerMeta
func (PlayerSnapshotWithRelations) PlayerSnapshot ¶ added in v1.0.0
func (ps PlayerSnapshotWithRelations) PlayerSnapshot() PlayerSnapshot
func (PlayerSnapshotWithRelations) Tribe ¶ added in v0.7.0
func (ps PlayerSnapshotWithRelations) Tribe() NullTribeMeta
type PlayerSnapshots ¶ added in v1.0.0
type PlayerSnapshots []PlayerSnapshot
type PlayerSnapshotsWithRelations ¶ added in v1.0.0
type PlayerSnapshotsWithRelations []PlayerSnapshotWithRelations
type PlayerSort ¶
type PlayerSort uint8
const ( PlayerSortIDASC PlayerSort = iota + 1 PlayerSortIDDESC PlayerSortServerKeyASC PlayerSortServerKeyDESC PlayerSortODScoreAttASC PlayerSortODScoreAttDESC PlayerSortODScoreDefASC PlayerSortODScoreDefDESC PlayerSortODScoreSupASC PlayerSortODScoreSupDESC PlayerSortODScoreTotalASC PlayerSortODScoreTotalDESC PlayerSortPointsASC PlayerSortPointsDESC PlayerSortMostPointsASC PlayerSortMostPointsDESC PlayerSortDeletedAtASC PlayerSortDeletedAtDESC )
func (PlayerSort) IsInConflict ¶ added in v1.0.0
func (s PlayerSort) IsInConflict(s2 PlayerSort) bool
IsInConflict returns true if two sorts can't be used together (e.g. PlayerSortIDASC and PlayerSortIDDESC).
func (PlayerSort) String ¶ added in v1.0.0
func (s PlayerSort) String() string
type PlayerWithRelations ¶ added in v0.2.0
type PlayerWithRelations struct {
// contains filtered or unexported fields
}
func (PlayerWithRelations) IsZero ¶ added in v1.0.0
func (p PlayerWithRelations) IsZero() bool
func (PlayerWithRelations) Meta ¶ added in v1.0.0
func (p PlayerWithRelations) Meta() PlayerMetaWithRelations
func (PlayerWithRelations) Player ¶ added in v1.0.0
func (p PlayerWithRelations) Player() Player
func (PlayerWithRelations) Server ¶ added in v0.8.3
func (p PlayerWithRelations) Server() ServerMeta
func (PlayerWithRelations) Tribe ¶ added in v0.2.0
func (p PlayerWithRelations) Tribe() NullTribeMeta
type Players ¶ added in v1.0.0
type Players []Player
func (Players) Delete ¶ added in v1.0.0
func (ps Players) Delete(serverKey string, active BasePlayers) ([]int, []CreateTribeChangeParams, error)
Delete finds all players with the given serverKey that are not in the given slice with active players and returns their ids + tribe changes that must be created. Both slices must be sorted in ascending order by ID. + if ps contains players from different servers. they must be sorted in ascending order by server key.
type PlayersSyncedEventPayload ¶ added in v1.0.0
type PlayersSyncedEventPayload struct {
// contains filtered or unexported fields
}
func NewPlayersSyncedEventPayload ¶ added in v1.0.0
func (PlayersSyncedEventPayload) NumActivePlayers ¶ added in v1.0.1
func (p PlayersSyncedEventPayload) NumActivePlayers() int
func (PlayersSyncedEventPayload) NumInactivePlayers ¶ added in v1.1.0
func (p PlayersSyncedEventPayload) NumInactivePlayers() int
func (PlayersSyncedEventPayload) NumPlayers ¶ added in v1.0.0
func (p PlayersSyncedEventPayload) NumPlayers() int
func (PlayersSyncedEventPayload) ServerKey ¶ added in v1.0.0
func (p PlayersSyncedEventPayload) ServerKey() string
func (PlayersSyncedEventPayload) ServerURL ¶ added in v1.0.0
func (p PlayersSyncedEventPayload) ServerURL() *url.URL
func (PlayersSyncedEventPayload) VersionCode ¶ added in v1.0.0
func (p PlayersSyncedEventPayload) VersionCode() string
type PlayersWithRelations ¶ added in v1.0.0
type PlayersWithRelations []PlayerWithRelations
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func UnmarshalServerFromDatabase ¶ added in v1.0.0
func UnmarshalServerFromDatabase( key string, versionCode string, rawURL string, open bool, special bool, numPlayers int, numActivePlayers int, numInactivePlayers int, numTribes int, numActiveTribes int, numInactiveTribes int, numVillages int, numPlayerVillages int, numBarbarianVillages int, numBonusVillages int, config ServerConfig, buildingInfo BuildingInfo, unitInfo UnitInfo, createdAt time.Time, snapshotCreatedAt time.Time, playerDataSyncedAt time.Time, playerSnapshotsCreatedAt time.Time, tribeDataSyncedAt time.Time, tribeSnapshotsCreatedAt time.Time, villageDataSyncedAt time.Time, ennoblementDataSyncedAt time.Time, ) (Server, error)
UnmarshalServerFromDatabase unmarshals Server from the database.
It should be used only for unmarshalling from the database! You can't use UnmarshalServerFromDatabase as constructor - It may put domain into the invalid state!
func (Server) Base ¶ added in v1.0.0
func (s Server) Base() BaseServer
func (Server) BuildingInfo ¶
func (s Server) BuildingInfo() BuildingInfo
func (Server) Config ¶
func (s Server) Config() ServerConfig
func (Server) EnnoblementDataSyncedAt ¶ added in v1.0.0
func (Server) Meta ¶ added in v1.0.0
func (s Server) Meta() ServerMeta
func (Server) NumActivePlayers ¶ added in v1.0.1
func (Server) NumActiveTribes ¶ added in v1.0.1
func (Server) NumBarbarianVillages ¶ added in v0.6.2
func (Server) NumBonusVillages ¶ added in v0.6.2
func (Server) NumInactivePlayers ¶ added in v1.1.0
func (Server) NumInactiveTribes ¶ added in v1.1.0
func (Server) NumPlayerVillages ¶ added in v0.6.2
func (Server) NumPlayers ¶
func (Server) NumVillages ¶
func (Server) PlayerDataSyncedAt ¶ added in v1.0.0
func (Server) PlayerSnapshotsCreatedAt ¶ added in v0.3.0
func (Server) SnapshotCreatedAt ¶ added in v1.1.0
func (Server) ToCursor ¶ added in v1.0.0
func (s Server) ToCursor() (ServerCursor, error)
func (Server) TribeDataSyncedAt ¶ added in v1.0.0
func (Server) TribeSnapshotsCreatedAt ¶ added in v0.3.0
func (Server) VersionCode ¶
func (Server) VillageDataSyncedAt ¶ added in v1.0.0
type ServerConfig ¶
type ServerConfig struct {
// contains filtered or unexported fields
}
func NewServerConfig ¶ added in v1.0.0
func NewServerConfig( speed float64, unitSpeed float64, moral int, 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, ) (ServerConfig, error)
func (ServerConfig) Ally ¶
func (s ServerConfig) Ally() ServerConfigAlly
func (ServerConfig) Build ¶
func (s ServerConfig) Build() ServerConfigBuild
func (ServerConfig) Buildings ¶
func (s ServerConfig) Buildings() ServerConfigBuildings
func (ServerConfig) Commands ¶
func (s ServerConfig) Commands() ServerConfigCommands
func (ServerConfig) Coord ¶
func (s ServerConfig) Coord() ServerConfigCoord
func (ServerConfig) Game ¶
func (s ServerConfig) Game() ServerConfigGame
func (ServerConfig) Misc ¶
func (s ServerConfig) Misc() ServerConfigMisc
func (ServerConfig) Moral ¶
func (s ServerConfig) Moral() int
func (ServerConfig) Newbie ¶
func (s ServerConfig) Newbie() ServerConfigNewbie
func (ServerConfig) Night ¶
func (s ServerConfig) Night() ServerConfigNight
func (ServerConfig) Sitter ¶
func (s ServerConfig) Sitter() ServerConfigSitter
func (ServerConfig) Sleep ¶
func (s ServerConfig) Sleep() ServerConfigSleep
func (ServerConfig) Snob ¶
func (s ServerConfig) Snob() ServerConfigSnob
func (ServerConfig) Speed ¶
func (s ServerConfig) Speed() float64
func (ServerConfig) UnitSpeed ¶
func (s ServerConfig) UnitSpeed() float64
func (ServerConfig) Win ¶
func (s ServerConfig) Win() ServerConfigWin
type ServerConfigAlly ¶
type ServerConfigBuild ¶
type ServerConfigBuild struct {
Destroy int
}
type ServerConfigBuildings ¶
type ServerConfigBuildings struct { CustomBarracks int CustomChurch int CustomFarm int CustomGarage int CustomHide int CustomIron int CustomMain int CustomMarket int CustomPlace int CustomSmith int CustomSnob int CustomStable int CustomStatue int CustomStone int CustomStorage int CustomWall int CustomWatchtower int CustomWood int }
type ServerConfigCommands ¶
type ServerConfigCoord ¶
type ServerConfigGame ¶
type ServerConfigGame struct { Archer int BarbarianMaxPoints int BarbarianRise float64 BarbarianShrink int BaseProduction int BuildtimeFormula int Church int Event int FakeLimit float64 FarmLimit int Hauls int HaulsBase int HaulsMax int Knight int KnightNewItems int Scavenging int Stronghold int SuppressEvents int Tech int Watchtower int }
type ServerConfigMisc ¶
type ServerConfigNewbie ¶
type ServerConfigNight ¶
type ServerConfigSitter ¶
type ServerConfigSitter struct {
Allow int
}
type ServerConfigSleep ¶
type ServerConfigSnob ¶
type ServerConfigWin ¶
type ServerConfigWin struct {
Check int
}
type ServerCursor ¶ added in v1.0.0
type ServerCursor struct {
// contains filtered or unexported fields
}
func NewServerCursor ¶ added in v1.0.0
func NewServerCursor(key string, open bool) (ServerCursor, error)
func (ServerCursor) Encode ¶ added in v1.0.0
func (sc ServerCursor) Encode() string
func (ServerCursor) IsZero ¶ added in v1.0.0
func (sc ServerCursor) IsZero() bool
func (ServerCursor) Key ¶ added in v1.0.0
func (sc ServerCursor) Key() string
func (ServerCursor) Open ¶ added in v1.0.0
func (sc ServerCursor) Open() bool
type ServerMap ¶ added in v1.4.1
type ServerMap struct {
// contains filtered or unexported fields
}
func NewServerMap ¶ added in v1.4.1
func NewServerMap(server Server, markersCh <-chan ServerMapMarker) ServerMap
func (*ServerMap) BackgroundColor ¶ added in v1.4.1
func (*ServerMap) ContinentGrid ¶ added in v1.4.1
func (*ServerMap) ContinentNumberColor ¶ added in v1.4.1
func (*ServerMap) ContinentNumbers ¶ added in v1.4.1
func (*ServerMap) GridLineColor ¶ added in v1.4.1
func (*ServerMap) LegendEntries ¶ added in v1.4.1
func (m *ServerMap) LegendEntries() []ServerMapLegendEntry
func (*ServerMap) SetBackgroundColor ¶ added in v1.4.1
func (*ServerMap) SetCenterX ¶ added in v1.4.1
func (*ServerMap) SetCenterY ¶ added in v1.4.1
func (*ServerMap) SetContinentGrid ¶ added in v1.4.1
func (*ServerMap) SetContinentNumberColor ¶ added in v1.4.1
func (*ServerMap) SetContinentNumbers ¶ added in v1.4.1
func (*ServerMap) SetGridLineColor ¶ added in v1.4.1
func (*ServerMap) SetLegendEntries ¶ added in v1.4.1
func (m *ServerMap) SetLegendEntries(legendEntries []ServerMapLegendEntry) error
type ServerMapLegendEntry ¶ added in v1.4.1
type ServerMapLegendEntry struct {
// contains filtered or unexported fields
}
func NewServerMapLegendEntry ¶ added in v1.4.1
func NewServerMapLegendEntry(c color.Color, names ...string) ServerMapLegendEntry
func (ServerMapLegendEntry) Color ¶ added in v1.4.1
func (e ServerMapLegendEntry) Color() color.Color
func (ServerMapLegendEntry) Names ¶ added in v1.4.1
func (e ServerMapLegendEntry) Names() []string
type ServerMapMarker ¶ added in v1.4.1
type ServerMapMarker struct {
// contains filtered or unexported fields
}
func NewServerMapMarker ¶ added in v1.4.1
func NewServerMapMarker(village VillageMeta) ServerMapMarker
func (*ServerMapMarker) Color ¶ added in v1.4.1
func (m *ServerMapMarker) Color() color.RGBA
func (*ServerMapMarker) SetColor ¶ added in v1.4.1
func (m *ServerMapMarker) SetColor(c color.RGBA) error
func (*ServerMapMarker) Village ¶ added in v1.4.1
func (m *ServerMapMarker) Village() VillageMeta
type ServerMeta ¶ added in v0.8.3
type ServerMeta struct {
// contains filtered or unexported fields
}
func UnmarshalServerMetaFromDatabase ¶ added in v1.0.0
func UnmarshalServerMetaFromDatabase(key string, rawURL string, open bool) (ServerMeta, error)
UnmarshalServerMetaFromDatabase unmarshals ServerMeta from the database.
It should be used only for unmarshalling from the database! You can't use UnmarshalServerMetaFromDatabase as constructor - It may put domain into the invalid state!
func (ServerMeta) Key ¶ added in v0.8.3
func (s ServerMeta) Key() string
func (ServerMeta) Open ¶ added in v0.8.3
func (s ServerMeta) Open() bool
func (ServerMeta) URL ¶ added in v0.8.3
func (s ServerMeta) URL() *url.URL
type ServerNotFoundError ¶
type ServerNotFoundError struct {
Key string
}
func (ServerNotFoundError) Code ¶
func (e ServerNotFoundError) Code() string
func (ServerNotFoundError) Error ¶
func (e ServerNotFoundError) Error() string
func (ServerNotFoundError) Params ¶ added in v1.0.0
func (e ServerNotFoundError) Params() map[string]any
func (ServerNotFoundError) Type ¶ added in v1.0.0
func (e ServerNotFoundError) Type() ErrorType
type ServerSnapshot ¶ added in v1.1.0
type ServerSnapshot struct {
// contains filtered or unexported fields
}
func UnmarshalServerSnapshotFromDatabase ¶ added in v1.1.0
func UnmarshalServerSnapshotFromDatabase( id int, serverKey string, numPlayers int, numActivePlayers int, numInactivePlayers int, numTribes int, numActiveTribes int, numInactiveTribes int, numVillages int, numPlayerVillages int, numBarbarianVillages int, numBonusVillages int, date time.Time, createdAt time.Time, ) (ServerSnapshot, error)
UnmarshalServerSnapshotFromDatabase unmarshals ServerSnapshot from the database.
It should be used only for unmarshalling from the database! You can't use UnmarshalServerSnapshotFromDatabase as constructor - It may put domain into the invalid state!
func (ServerSnapshot) CreatedAt ¶ added in v1.1.0
func (ss ServerSnapshot) CreatedAt() time.Time
func (ServerSnapshot) Date ¶ added in v1.1.0
func (ss ServerSnapshot) Date() time.Time
func (ServerSnapshot) ID ¶ added in v1.1.0
func (ss ServerSnapshot) ID() int
func (ServerSnapshot) IsZero ¶ added in v1.1.0
func (ss ServerSnapshot) IsZero() bool
func (ServerSnapshot) NumActivePlayers ¶ added in v1.1.0
func (ss ServerSnapshot) NumActivePlayers() int
func (ServerSnapshot) NumActiveTribes ¶ added in v1.1.0
func (ss ServerSnapshot) NumActiveTribes() int
func (ServerSnapshot) NumBarbarianVillages ¶ added in v1.1.0
func (ss ServerSnapshot) NumBarbarianVillages() int
func (ServerSnapshot) NumBonusVillages ¶ added in v1.1.0
func (ss ServerSnapshot) NumBonusVillages() int
func (ServerSnapshot) NumInactivePlayers ¶ added in v1.1.0
func (ss ServerSnapshot) NumInactivePlayers() int
func (ServerSnapshot) NumInactiveTribes ¶ added in v1.1.0
func (ss ServerSnapshot) NumInactiveTribes() int
func (ServerSnapshot) NumPlayerVillages ¶ added in v1.1.0
func (ss ServerSnapshot) NumPlayerVillages() int
func (ServerSnapshot) NumPlayers ¶ added in v1.1.0
func (ss ServerSnapshot) NumPlayers() int
func (ServerSnapshot) NumTribes ¶ added in v1.1.0
func (ss ServerSnapshot) NumTribes() int
func (ServerSnapshot) NumVillages ¶ added in v1.1.0
func (ss ServerSnapshot) NumVillages() int
func (ServerSnapshot) ServerKey ¶ added in v1.1.0
func (ss ServerSnapshot) ServerKey() string
func (ServerSnapshot) ToCursor ¶ added in v1.1.0
func (ss ServerSnapshot) ToCursor() (ServerSnapshotCursor, error)
func (ServerSnapshot) WithRelations ¶ added in v1.3.0
func (ss ServerSnapshot) WithRelations(server ServerMeta) ServerSnapshotWithRelations
type ServerSnapshotCursor ¶ added in v1.1.0
type ServerSnapshotCursor struct {
// contains filtered or unexported fields
}
func NewServerSnapshotCursor ¶ added in v1.1.0
func (ServerSnapshotCursor) Date ¶ added in v1.1.0
func (ssc ServerSnapshotCursor) Date() time.Time
func (ServerSnapshotCursor) Encode ¶ added in v1.1.0
func (ssc ServerSnapshotCursor) Encode() string
func (ServerSnapshotCursor) ID ¶ added in v1.1.0
func (ssc ServerSnapshotCursor) ID() int
func (ServerSnapshotCursor) IsZero ¶ added in v1.1.0
func (ssc ServerSnapshotCursor) IsZero() bool
func (ServerSnapshotCursor) ServerKey ¶ added in v1.1.0
func (ssc ServerSnapshotCursor) ServerKey() string
type ServerSnapshotSort ¶ added in v1.1.0
type ServerSnapshotSort uint8
const ( ServerSnapshotSortDateASC ServerSnapshotSort = iota + 1 ServerSnapshotSortDateDESC ServerSnapshotSortIDASC ServerSnapshotSortIDDESC ServerSnapshotSortServerKeyASC ServerSnapshotSortServerKeyDESC )
func (ServerSnapshotSort) IsInConflict ¶ added in v1.1.0
func (s ServerSnapshotSort) IsInConflict(s2 ServerSnapshotSort) bool
IsInConflict returns true if two sorts can't be used together (e.g. ServerSnapshotSortIDASC and ServerSnapshotSortIDDESC).
func (ServerSnapshotSort) String ¶ added in v1.1.0
func (s ServerSnapshotSort) String() string
type ServerSnapshotWithRelations ¶ added in v1.3.0
type ServerSnapshotWithRelations struct {
// contains filtered or unexported fields
}
func (ServerSnapshotWithRelations) IsZero ¶ added in v1.3.0
func (ts ServerSnapshotWithRelations) IsZero() bool
func (ServerSnapshotWithRelations) Server ¶ added in v1.3.0
func (ts ServerSnapshotWithRelations) Server() ServerMeta
func (ServerSnapshotWithRelations) ServerSnapshot ¶ added in v1.3.0
func (ts ServerSnapshotWithRelations) ServerSnapshot() ServerSnapshot
type ServerSnapshots ¶ added in v1.1.0
type ServerSnapshots []ServerSnapshot
type ServerSnapshotsWithRelations ¶ added in v1.3.0
type ServerSnapshotsWithRelations []ServerSnapshotWithRelations
type ServerSort ¶ added in v1.0.0
type ServerSort uint8
const ( ServerSortKeyASC ServerSort = iota + 1 ServerSortKeyDESC ServerSortOpenASC ServerSortOpenDESC )
func (ServerSort) IsInConflict ¶ added in v1.0.0
func (s ServerSort) IsInConflict(s2 ServerSort) bool
IsInConflict returns true if two sorts can't be used together (e.g. ServerSortKeyASC and ServerSortKeyDESC).
func (ServerSort) String ¶ added in v1.0.0
func (s ServerSort) String() string
type ServerSyncedEventPayload ¶ added in v1.0.0
type ServerSyncedEventPayload struct {
// contains filtered or unexported fields
}
func NewServerSyncedEventPayload ¶ added in v1.0.0
func NewServerSyncedEventPayloads ¶ added in v1.0.0
func NewServerSyncedEventPayloads(servers BaseServers, versionCode string) ([]ServerSyncedEventPayload, error)
func (ServerSyncedEventPayload) Key ¶ added in v1.0.0
func (p ServerSyncedEventPayload) Key() string
func (ServerSyncedEventPayload) URL ¶ added in v1.0.0
func (p ServerSyncedEventPayload) URL() *url.URL
func (ServerSyncedEventPayload) VersionCode ¶ added in v1.0.0
func (p ServerSyncedEventPayload) VersionCode() string
type Servers ¶ added in v1.0.0
type Servers []Server
func (Servers) CleanUpData ¶ added in v1.0.0
func (ss Servers) CleanUpData() ([]CleanUpDataCmdPayload, error)
CleanUpData finds all servers for which old data (ennoblements, snapshots etc.) can be deleted.
func (Servers) Close ¶ added in v1.0.0
func (ss Servers) Close(open BaseServers) (BaseServers, error)
Close finds all servers with Server.Open returning true that are not in the given slice with open servers and then converts them to BaseServers with the corrected open value.
type SliceElementValidationError ¶ added in v1.0.0
func (SliceElementValidationError) Code ¶ added in v1.0.0
func (e SliceElementValidationError) Code() string
func (SliceElementValidationError) Error ¶ added in v1.0.0
func (e SliceElementValidationError) Error() string
func (SliceElementValidationError) Params ¶ added in v1.0.0
func (e SliceElementValidationError) Params() map[string]any
func (SliceElementValidationError) Path ¶ added in v1.0.0
func (e SliceElementValidationError) Path() ErrorPathSegment
func (SliceElementValidationError) Type ¶ added in v1.0.0
func (e SliceElementValidationError) Type() ErrorType
func (SliceElementValidationError) Unwrap ¶ added in v1.0.0
func (e SliceElementValidationError) Unwrap() error
type SnapshotsCreatedEventPayload ¶ added in v1.0.0
type SnapshotsCreatedEventPayload struct {
// contains filtered or unexported fields
}
func NewSnapshotsCreatedEventPayload ¶ added in v1.0.0
func NewSnapshotsCreatedEventPayload(serverKey string, versionCode string) (SnapshotsCreatedEventPayload, error)
func (SnapshotsCreatedEventPayload) ServerKey ¶ added in v1.0.0
func (p SnapshotsCreatedEventPayload) ServerKey() string
func (SnapshotsCreatedEventPayload) VersionCode ¶ added in v1.0.0
func (p SnapshotsCreatedEventPayload) VersionCode() string
type SortConflictError ¶ added in v1.0.0
type SortConflictError struct {
Sort [2]string
}
func (SortConflictError) Code ¶ added in v1.0.0
func (e SortConflictError) Code() string
func (SortConflictError) Error ¶ added in v1.0.0
func (e SortConflictError) Error() string
func (SortConflictError) Params ¶ added in v1.0.0
func (e SortConflictError) Params() map[string]any
func (SortConflictError) Type ¶ added in v1.0.0
func (e SortConflictError) Type() ErrorType
type SyncEnnoblementsCmdPayload ¶ added in v1.0.0
type SyncEnnoblementsCmdPayload struct {
// contains filtered or unexported fields
}
func NewSyncEnnoblementsCmdPayload ¶ added in v1.0.0
func (SyncEnnoblementsCmdPayload) ServerKey ¶ added in v1.0.0
func (p SyncEnnoblementsCmdPayload) ServerKey() string
func (SyncEnnoblementsCmdPayload) ServerURL ¶ added in v1.0.0
func (p SyncEnnoblementsCmdPayload) ServerURL() *url.URL
func (SyncEnnoblementsCmdPayload) VersionCode ¶ added in v1.0.0
func (p SyncEnnoblementsCmdPayload) VersionCode() string
type SyncServersCmdPayload ¶ added in v1.0.0
type SyncServersCmdPayload struct {
// contains filtered or unexported fields
}
func NewSyncServersCmdPayload ¶ added in v1.0.0
func NewSyncServersCmdPayload(versionCode string, u *url.URL) (SyncServersCmdPayload, error)
func (SyncServersCmdPayload) URL ¶ added in v1.0.0
func (p SyncServersCmdPayload) URL() *url.URL
func (SyncServersCmdPayload) VersionCode ¶ added in v1.0.0
func (p SyncServersCmdPayload) VersionCode() string
type Tribe ¶
type Tribe struct {
// contains filtered or unexported fields
}
func UnmarshalTribeFromDatabase ¶ added in v1.0.0
func UnmarshalTribeFromDatabase( id int, serverKey string, name string, tag string, numMembers int, numVillages int, points int, allPoints int, rank int, od OpponentsDefeated, rawProfileURL string, dominance float64, bestRank int, bestRankAt time.Time, mostPoints int, mostPointsAt time.Time, mostVillages int, mostVillagesAt time.Time, createdAt time.Time, deletedAt time.Time, ) (Tribe, error)
UnmarshalTribeFromDatabase unmarshals Tribe from the database.
It should be used only for unmarshalling from the database! You can't use UnmarshalTribeFromDatabase as constructor - It may put domain into the invalid state!
func (Tribe) BestRankAt ¶ added in v0.4.5
func (Tribe) MostPoints ¶ added in v0.4.5
func (Tribe) MostPointsAt ¶ added in v0.4.5
func (Tribe) MostVillages ¶ added in v0.4.5
func (Tribe) MostVillagesAt ¶ added in v0.4.5
func (Tribe) NumMembers ¶ added in v0.2.0
func (Tribe) NumVillages ¶ added in v0.2.0
func (Tribe) OD ¶ added in v1.0.0
func (t Tribe) OD() OpponentsDefeated
func (Tribe) ProfileURL ¶ added in v0.2.0
func (Tribe) ToCursor ¶ added in v1.0.0
func (t Tribe) ToCursor() (TribeCursor, error)
func (Tribe) WithRelations ¶ added in v1.8.0
func (t Tribe) WithRelations(server ServerMeta) TribeWithRelations
type TribeChange ¶ added in v0.4.0
type TribeChange struct {
// contains filtered or unexported fields
}
func UnmarshalTribeChangeFromDatabase ¶ added in v1.0.0
func UnmarshalTribeChangeFromDatabase( id int, serverKey string, playerID int, oldTribeID int, newTribeID int, createdAt time.Time, ) (TribeChange, error)
UnmarshalTribeChangeFromDatabase unmarshals TribeChange from the database.
It should be used only for unmarshalling from the database! You can't use UnmarshalTribeChangeFromDatabase as constructor - It may put domain into the invalid state!
func (TribeChange) CreatedAt ¶ added in v0.4.0
func (tc TribeChange) CreatedAt() time.Time
func (TribeChange) ID ¶ added in v0.4.0
func (tc TribeChange) ID() int
func (TribeChange) IsZero ¶ added in v1.0.0
func (tc TribeChange) IsZero() bool
func (TribeChange) NewTribeID ¶ added in v0.4.0
func (tc TribeChange) NewTribeID() int
func (TribeChange) OldTribeID ¶ added in v0.4.0
func (tc TribeChange) OldTribeID() int
func (TribeChange) PlayerID ¶ added in v0.4.0
func (tc TribeChange) PlayerID() int
func (TribeChange) ServerKey ¶ added in v0.4.0
func (tc TribeChange) ServerKey() string
func (TribeChange) ToCursor ¶ added in v1.0.0
func (tc TribeChange) ToCursor() (TribeChangeCursor, error)
func (TribeChange) WithRelations ¶ added in v1.0.0
func (tc TribeChange) WithRelations( player PlayerMeta, oldTribe NullTribeMeta, newTribe NullTribeMeta, ) TribeChangeWithRelations
type TribeChangeCursor ¶ added in v1.0.0
type TribeChangeCursor struct {
// contains filtered or unexported fields
}
func NewTribeChangeCursor ¶ added in v1.0.0
func (TribeChangeCursor) CreatedAt ¶ added in v1.0.0
func (tcc TribeChangeCursor) CreatedAt() time.Time
func (TribeChangeCursor) Encode ¶ added in v1.0.0
func (tcc TribeChangeCursor) Encode() string
func (TribeChangeCursor) ID ¶ added in v1.0.0
func (tcc TribeChangeCursor) ID() int
func (TribeChangeCursor) IsZero ¶ added in v1.0.0
func (tcc TribeChangeCursor) IsZero() bool
func (TribeChangeCursor) ServerKey ¶ added in v1.0.0
func (tcc TribeChangeCursor) ServerKey() string
type TribeChangeSort ¶ added in v0.7.5
type TribeChangeSort uint8
const ( TribeChangeSortCreatedAtASC TribeChangeSort = iota + 1 TribeChangeSortCreatedAtDESC TribeChangeSortIDASC TribeChangeSortIDDESC TribeChangeSortServerKeyASC TribeChangeSortServerKeyDESC )
func (TribeChangeSort) IsInConflict ¶ added in v1.0.0
func (s TribeChangeSort) IsInConflict(s2 TribeChangeSort) bool
IsInConflict returns true if two sorts can't be used together (e.g. TribeChangeSortIDASC and TribeChangeSortIDDESC).
func (TribeChangeSort) String ¶ added in v1.0.0
func (s TribeChangeSort) String() string
type TribeChangeWithRelations ¶ added in v0.7.5
type TribeChangeWithRelations struct {
// contains filtered or unexported fields
}
func (TribeChangeWithRelations) IsZero ¶ added in v1.0.0
func (tc TribeChangeWithRelations) IsZero() bool
func (TribeChangeWithRelations) NewTribe ¶ added in v0.7.5
func (tc TribeChangeWithRelations) NewTribe() NullTribeMeta
func (TribeChangeWithRelations) OldTribe ¶ added in v0.7.5
func (tc TribeChangeWithRelations) OldTribe() NullTribeMeta
func (TribeChangeWithRelations) Player ¶ added in v0.7.5
func (tc TribeChangeWithRelations) Player() PlayerMeta
func (TribeChangeWithRelations) TribeChange ¶ added in v1.0.0
func (tc TribeChangeWithRelations) TribeChange() TribeChange
type TribeChanges ¶ added in v1.0.0
type TribeChanges []TribeChange
type TribeChangesWithRelations ¶ added in v1.0.0
type TribeChangesWithRelations []TribeChangeWithRelations
type TribeCursor ¶ added in v1.0.0
type TribeCursor struct {
// contains filtered or unexported fields
}
func NewTribeCursor ¶ added in v1.0.0
func (TribeCursor) DeletedAt ¶ added in v1.0.0
func (tc TribeCursor) DeletedAt() time.Time
func (TribeCursor) Dominance ¶ added in v1.0.0
func (tc TribeCursor) Dominance() float64
func (TribeCursor) Encode ¶ added in v1.0.0
func (tc TribeCursor) Encode() string
func (TribeCursor) ID ¶ added in v1.0.0
func (tc TribeCursor) ID() int
func (TribeCursor) IsZero ¶ added in v1.0.0
func (tc TribeCursor) IsZero() bool
func (TribeCursor) MostPoints ¶ added in v1.4.0
func (tc TribeCursor) MostPoints() int
func (TribeCursor) ODScoreAtt ¶ added in v1.0.0
func (tc TribeCursor) ODScoreAtt() int
func (TribeCursor) ODScoreDef ¶ added in v1.0.0
func (tc TribeCursor) ODScoreDef() int
func (TribeCursor) ODScoreTotal ¶ added in v1.0.0
func (tc TribeCursor) ODScoreTotal() int
func (TribeCursor) Points ¶ added in v1.0.0
func (tc TribeCursor) Points() int
func (TribeCursor) ServerKey ¶ added in v1.0.0
func (tc TribeCursor) ServerKey() string
type TribeMeta ¶ added in v0.2.0
type TribeMeta struct {
// contains filtered or unexported fields
}
func UnmarshalTribeMetaFromDatabase ¶ added in v1.0.0
func UnmarshalTribeMetaFromDatabase(id int, name string, tag string, rawProfileURL string) (TribeMeta, error)
UnmarshalTribeMetaFromDatabase unmarshals TribeMeta from the database.
It should be used only for unmarshalling from the database! You can't use UnmarshalTribeMetaFromDatabase as constructor - It may put domain into the invalid state!
func (TribeMeta) ProfileURL ¶ added in v0.2.0
type TribeNotFoundError ¶
func (TribeNotFoundError) Code ¶
func (e TribeNotFoundError) Code() string
func (TribeNotFoundError) Error ¶
func (e TribeNotFoundError) Error() string
func (TribeNotFoundError) Params ¶ added in v1.0.0
func (e TribeNotFoundError) Params() map[string]any
func (TribeNotFoundError) Type ¶ added in v1.0.0
func (e TribeNotFoundError) Type() ErrorType
type TribeSnapshot ¶ added in v0.3.0
type TribeSnapshot struct {
// contains filtered or unexported fields
}
func UnmarshalTribeSnapshotFromDatabase ¶ added in v1.0.0
func UnmarshalTribeSnapshotFromDatabase( id int, tribeID int, serverKey string, numMembers int, numVillages int, points int, allPoints int, rank int, od OpponentsDefeated, dominance float64, date time.Time, createdAt time.Time, ) (TribeSnapshot, error)
UnmarshalTribeSnapshotFromDatabase unmarshals TribeSnapshot from the database.
It should be used only for unmarshalling from the database! You can't use UnmarshalTribeSnapshotFromDatabase as constructor - It may put domain into the invalid state!
func (TribeSnapshot) AllPoints ¶ added in v0.3.0
func (ts TribeSnapshot) AllPoints() int
func (TribeSnapshot) CreatedAt ¶ added in v0.3.0
func (ts TribeSnapshot) CreatedAt() time.Time
func (TribeSnapshot) Date ¶ added in v0.3.0
func (ts TribeSnapshot) Date() time.Time
func (TribeSnapshot) Dominance ¶ added in v0.3.0
func (ts TribeSnapshot) Dominance() float64
func (TribeSnapshot) ID ¶ added in v0.3.0
func (ts TribeSnapshot) ID() int
func (TribeSnapshot) IsZero ¶ added in v1.0.0
func (ts TribeSnapshot) IsZero() bool
func (TribeSnapshot) NumMembers ¶ added in v0.3.0
func (ts TribeSnapshot) NumMembers() int
func (TribeSnapshot) NumVillages ¶ added in v0.3.0
func (ts TribeSnapshot) NumVillages() int
func (TribeSnapshot) OD ¶ added in v1.0.0
func (ts TribeSnapshot) OD() OpponentsDefeated
func (TribeSnapshot) Points ¶ added in v0.3.0
func (ts TribeSnapshot) Points() int
func (TribeSnapshot) Rank ¶ added in v0.3.0
func (ts TribeSnapshot) Rank() int
func (TribeSnapshot) ServerKey ¶ added in v0.3.0
func (ts TribeSnapshot) ServerKey() string
func (TribeSnapshot) ToCursor ¶ added in v1.0.0
func (ts TribeSnapshot) ToCursor() (TribeSnapshotCursor, error)
func (TribeSnapshot) TribeID ¶ added in v0.3.0
func (ts TribeSnapshot) TribeID() int
func (TribeSnapshot) WithRelations ¶ added in v1.0.0
func (ts TribeSnapshot) WithRelations(tribe TribeMeta) TribeSnapshotWithRelations
type TribeSnapshotCursor ¶ added in v1.0.0
type TribeSnapshotCursor struct {
// contains filtered or unexported fields
}
func NewTribeSnapshotCursor ¶ added in v1.0.0
func (TribeSnapshotCursor) Date ¶ added in v1.0.0
func (tsc TribeSnapshotCursor) Date() time.Time
func (TribeSnapshotCursor) Encode ¶ added in v1.0.0
func (tsc TribeSnapshotCursor) Encode() string
func (TribeSnapshotCursor) ID ¶ added in v1.0.0
func (tsc TribeSnapshotCursor) ID() int
func (TribeSnapshotCursor) IsZero ¶ added in v1.0.0
func (tsc TribeSnapshotCursor) IsZero() bool
func (TribeSnapshotCursor) ServerKey ¶ added in v1.0.0
func (tsc TribeSnapshotCursor) ServerKey() string
type TribeSnapshotSort ¶ added in v0.10.0
type TribeSnapshotSort uint8
const ( TribeSnapshotSortDateASC TribeSnapshotSort = iota + 1 TribeSnapshotSortDateDESC TribeSnapshotSortIDASC TribeSnapshotSortIDDESC TribeSnapshotSortServerKeyASC TribeSnapshotSortServerKeyDESC )
func (TribeSnapshotSort) IsInConflict ¶ added in v1.0.0
func (s TribeSnapshotSort) IsInConflict(s2 TribeSnapshotSort) bool
IsInConflict returns true if two sorts can't be used together (e.g. TribeSnapshotSortIDASC and TribeSnapshotSortIDDESC).
func (TribeSnapshotSort) String ¶ added in v1.0.0
func (s TribeSnapshotSort) String() string
type TribeSnapshotWithRelations ¶ added in v1.0.0
type TribeSnapshotWithRelations struct {
// contains filtered or unexported fields
}
func (TribeSnapshotWithRelations) IsZero ¶ added in v1.0.0
func (ts TribeSnapshotWithRelations) IsZero() bool
func (TribeSnapshotWithRelations) Tribe ¶ added in v1.0.0
func (ts TribeSnapshotWithRelations) Tribe() TribeMeta
func (TribeSnapshotWithRelations) TribeSnapshot ¶ added in v1.0.0
func (ts TribeSnapshotWithRelations) TribeSnapshot() TribeSnapshot
type TribeSnapshots ¶ added in v1.0.0
type TribeSnapshots []TribeSnapshot
type TribeSnapshotsWithRelations ¶ added in v1.0.0
type TribeSnapshotsWithRelations []TribeSnapshotWithRelations
type TribeSort ¶
type TribeSort uint8
const ( TribeSortIDASC TribeSort = iota + 1 TribeSortIDDESC TribeSortServerKeyASC TribeSortServerKeyDESC TribeSortODScoreAttASC TribeSortODScoreAttDESC TribeSortODScoreDefASC TribeSortODScoreDefDESC TribeSortODScoreTotalASC TribeSortODScoreTotalDESC TribeSortPointsASC TribeSortPointsDESC TribeSortMostPointsASC TribeSortMostPointsDESC TribeSortDominanceASC TribeSortDominanceDESC TribeSortDeletedAtASC TribeSortDeletedAtDESC )
func (TribeSort) IsInConflict ¶ added in v1.0.0
IsInConflict returns true if two sorts can't be used together (e.g. TribeSortIDASC and TribeSortIDDESC).
type TribeWithRelations ¶ added in v1.8.0
type TribeWithRelations struct {
// contains filtered or unexported fields
}
func (TribeWithRelations) IsZero ¶ added in v1.8.0
func (t TribeWithRelations) IsZero() bool
func (TribeWithRelations) Server ¶ added in v1.8.0
func (t TribeWithRelations) Server() ServerMeta
func (TribeWithRelations) Tribe ¶ added in v1.8.0
func (t TribeWithRelations) Tribe() Tribe
type Tribes ¶ added in v1.0.0
type Tribes []Tribe
func (Tribes) Delete ¶ added in v1.0.0
func (ts Tribes) Delete(serverKey string, active BaseTribes) []int
Delete finds all tribes with the given serverKey that are not in the given slice with active tribes and returns their ids. Both slices must be sorted in ascending order by ID + if vs contains tribes from different servers. they must be sorted in ascending order by server key.
type TribesSyncedEventPayload ¶ added in v1.0.0
type TribesSyncedEventPayload struct {
// contains filtered or unexported fields
}
func NewTribesSyncedEventPayload ¶ added in v1.0.0
func (TribesSyncedEventPayload) NumActiveTribes ¶ added in v1.0.1
func (p TribesSyncedEventPayload) NumActiveTribes() int
func (TribesSyncedEventPayload) NumInactiveTribes ¶ added in v1.1.0
func (p TribesSyncedEventPayload) NumInactiveTribes() int
func (TribesSyncedEventPayload) NumTribes ¶ added in v1.0.0
func (p TribesSyncedEventPayload) NumTribes() int
func (TribesSyncedEventPayload) ServerKey ¶ added in v1.0.0
func (p TribesSyncedEventPayload) ServerKey() string
func (TribesSyncedEventPayload) ServerURL ¶ added in v1.0.0
func (p TribesSyncedEventPayload) ServerURL() *url.URL
func (TribesSyncedEventPayload) VersionCode ¶ added in v1.0.0
func (p TribesSyncedEventPayload) VersionCode() string
type TribesWithRelations ¶ added in v1.8.0
type TribesWithRelations []TribeWithRelations
type UnitInfo ¶
type UnitInfo struct {
// contains filtered or unexported fields
}
func NewUnitInfo ¶ added in v1.0.0
type UnsupportedSortStringError ¶ added in v1.0.0
type UnsupportedSortStringError struct {
Sort string
}
func (UnsupportedSortStringError) Code ¶ added in v1.0.0
func (e UnsupportedSortStringError) Code() string
func (UnsupportedSortStringError) Error ¶ added in v1.0.0
func (e UnsupportedSortStringError) Error() string
func (UnsupportedSortStringError) Params ¶ added in v1.0.0
func (e UnsupportedSortStringError) Params() map[string]any
func (UnsupportedSortStringError) Type ¶ added in v1.0.0
func (e UnsupportedSortStringError) Type() ErrorType
type UpdateServerParams ¶
type UpdateServerParams struct {
// contains filtered or unexported fields
}
func (*UpdateServerParams) BuildingInfo ¶
func (params *UpdateServerParams) BuildingInfo() NullBuildingInfo
func (*UpdateServerParams) Config ¶
func (params *UpdateServerParams) Config() NullServerConfig
func (*UpdateServerParams) EnnoblementDataSyncedAt ¶ added in v1.0.0
func (params *UpdateServerParams) EnnoblementDataSyncedAt() NullTime
func (*UpdateServerParams) IsZero ¶
func (params *UpdateServerParams) IsZero() bool
func (*UpdateServerParams) NumActivePlayers ¶ added in v1.0.1
func (params *UpdateServerParams) NumActivePlayers() NullInt
func (*UpdateServerParams) NumActiveTribes ¶ added in v1.0.1
func (params *UpdateServerParams) NumActiveTribes() NullInt
func (*UpdateServerParams) NumBarbarianVillages ¶ added in v0.6.2
func (params *UpdateServerParams) NumBarbarianVillages() NullInt
func (*UpdateServerParams) NumBonusVillages ¶ added in v0.6.2
func (params *UpdateServerParams) NumBonusVillages() NullInt
func (*UpdateServerParams) NumInactivePlayers ¶ added in v1.1.0
func (params *UpdateServerParams) NumInactivePlayers() NullInt
func (*UpdateServerParams) NumInactiveTribes ¶ added in v1.1.0
func (params *UpdateServerParams) NumInactiveTribes() NullInt
func (*UpdateServerParams) NumPlayerVillages ¶ added in v0.6.2
func (params *UpdateServerParams) NumPlayerVillages() NullInt
func (*UpdateServerParams) NumPlayers ¶
func (params *UpdateServerParams) NumPlayers() NullInt
func (*UpdateServerParams) NumTribes ¶
func (params *UpdateServerParams) NumTribes() NullInt
func (*UpdateServerParams) NumVillages ¶
func (params *UpdateServerParams) NumVillages() NullInt
func (*UpdateServerParams) PlayerDataSyncedAt ¶ added in v1.0.0
func (params *UpdateServerParams) PlayerDataSyncedAt() NullTime
func (*UpdateServerParams) PlayerSnapshotsCreatedAt ¶ added in v0.3.0
func (params *UpdateServerParams) PlayerSnapshotsCreatedAt() NullTime
func (*UpdateServerParams) SetBuildingInfo ¶ added in v1.0.0
func (params *UpdateServerParams) SetBuildingInfo(buildingInfo NullBuildingInfo) error
func (*UpdateServerParams) SetConfig ¶ added in v1.0.0
func (params *UpdateServerParams) SetConfig(config NullServerConfig) error
func (*UpdateServerParams) SetEnnoblementDataSyncedAt ¶ added in v1.0.0
func (params *UpdateServerParams) SetEnnoblementDataSyncedAt(ennoblementDataSyncedAt NullTime) error
func (*UpdateServerParams) SetNumActivePlayers ¶ added in v1.0.1
func (params *UpdateServerParams) SetNumActivePlayers(num NullInt) error
func (*UpdateServerParams) SetNumActiveTribes ¶ added in v1.0.1
func (params *UpdateServerParams) SetNumActiveTribes(num NullInt) error
func (*UpdateServerParams) SetNumBarbarianVillages ¶ added in v1.0.0
func (params *UpdateServerParams) SetNumBarbarianVillages(numBarbarianVillages NullInt) error
func (*UpdateServerParams) SetNumBonusVillages ¶ added in v1.0.0
func (params *UpdateServerParams) SetNumBonusVillages(numBonusVillages NullInt) error
func (*UpdateServerParams) SetNumInactivePlayers ¶ added in v1.1.0
func (params *UpdateServerParams) SetNumInactivePlayers(num NullInt) error
func (*UpdateServerParams) SetNumInactiveTribes ¶ added in v1.1.0
func (params *UpdateServerParams) SetNumInactiveTribes(num NullInt) error
func (*UpdateServerParams) SetNumPlayerVillages ¶ added in v1.0.0
func (params *UpdateServerParams) SetNumPlayerVillages(numPlayerVillages NullInt) error
func (*UpdateServerParams) SetNumPlayers ¶ added in v1.0.0
func (params *UpdateServerParams) SetNumPlayers(num NullInt) error
func (*UpdateServerParams) SetNumTribes ¶ added in v1.0.0
func (params *UpdateServerParams) SetNumTribes(num NullInt) error
func (*UpdateServerParams) SetNumVillages ¶ added in v1.0.0
func (params *UpdateServerParams) SetNumVillages(numVillages NullInt) error
func (*UpdateServerParams) SetPlayerDataSyncedAt ¶ added in v1.0.0
func (params *UpdateServerParams) SetPlayerDataSyncedAt(playerDataSyncedAt NullTime) error
func (*UpdateServerParams) SetPlayerSnapshotsCreatedAt ¶ added in v1.0.0
func (params *UpdateServerParams) SetPlayerSnapshotsCreatedAt(playerSnapshotsCreatedAt NullTime) error
func (*UpdateServerParams) SetSnapshotCreatedAt ¶ added in v1.1.0
func (params *UpdateServerParams) SetSnapshotCreatedAt(snapshotCreatedAt NullTime) error
func (*UpdateServerParams) SetTribeDataSyncedAt ¶ added in v1.0.0
func (params *UpdateServerParams) SetTribeDataSyncedAt(tribeDataSyncedAt NullTime) error
func (*UpdateServerParams) SetTribeSnapshotsCreatedAt ¶ added in v1.0.0
func (params *UpdateServerParams) SetTribeSnapshotsCreatedAt(tribeSnapshotsCreatedAt NullTime) error
func (*UpdateServerParams) SetUnitInfo ¶ added in v1.0.0
func (params *UpdateServerParams) SetUnitInfo(unitInfo NullUnitInfo) error
func (*UpdateServerParams) SetVillageDataSyncedAt ¶ added in v1.0.0
func (params *UpdateServerParams) SetVillageDataSyncedAt(villageDataSyncedAt NullTime) error
func (*UpdateServerParams) SnapshotCreatedAt ¶ added in v1.1.0
func (params *UpdateServerParams) SnapshotCreatedAt() NullTime
func (*UpdateServerParams) TribeDataSyncedAt ¶ added in v1.0.0
func (params *UpdateServerParams) TribeDataSyncedAt() NullTime
func (*UpdateServerParams) TribeSnapshotsCreatedAt ¶ added in v0.3.0
func (params *UpdateServerParams) TribeSnapshotsCreatedAt() NullTime
func (*UpdateServerParams) UnitInfo ¶
func (params *UpdateServerParams) UnitInfo() NullUnitInfo
func (*UpdateServerParams) VillageDataSyncedAt ¶ added in v1.0.0
func (params *UpdateServerParams) VillageDataSyncedAt() NullTime
type ValidationError ¶
func (ValidationError) Code ¶
func (e ValidationError) Code() string
func (ValidationError) Error ¶
func (e ValidationError) Error() string
func (ValidationError) Params ¶ added in v1.0.0
func (e ValidationError) Params() map[string]any
func (ValidationError) Path ¶ added in v1.0.0
func (e ValidationError) Path() ErrorPathSegment
func (ValidationError) Type ¶ added in v1.0.0
func (e ValidationError) Type() ErrorType
func (ValidationError) Unwrap ¶
func (e ValidationError) Unwrap() error
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
func UnmarshalVersionFromDatabase ¶ added in v1.0.0
func UnmarshalVersionFromDatabase( code string, name string, host string, timezone string, ) (Version, error)
UnmarshalVersionFromDatabase unmarshals Version from the database.
It should be used only for unmarshalling from the database! You can't use UnmarshalVersionFromDatabase as constructor - It may put domain into the invalid state!
func (Version) ToCursor ¶ added in v1.0.0
func (v Version) ToCursor() (VersionCursor, error)
type VersionCursor ¶ added in v1.0.0
type VersionCursor struct {
// contains filtered or unexported fields
}
func NewVersionCursor ¶ added in v1.0.0
func NewVersionCursor(code string) (VersionCursor, error)
func (VersionCursor) Code ¶ added in v1.0.0
func (vc VersionCursor) Code() string
func (VersionCursor) Encode ¶ added in v1.0.0
func (vc VersionCursor) Encode() string
func (VersionCursor) IsZero ¶ added in v1.0.0
func (vc VersionCursor) IsZero() bool
type VersionNotFoundError ¶
type VersionNotFoundError struct {
VersionCode string
}
func (VersionNotFoundError) Code ¶
func (e VersionNotFoundError) Code() string
func (VersionNotFoundError) Error ¶
func (e VersionNotFoundError) Error() string
func (VersionNotFoundError) Params ¶ added in v1.0.0
func (e VersionNotFoundError) Params() map[string]any
func (VersionNotFoundError) Type ¶ added in v1.0.0
func (e VersionNotFoundError) Type() ErrorType
type VersionSort ¶ added in v1.0.0
type VersionSort uint8
const ( VersionSortCodeASC VersionSort = iota + 1 VersionSortCodeDESC )
func (VersionSort) IsInConflict ¶ added in v1.0.0
func (s VersionSort) IsInConflict(s2 VersionSort) bool
IsInConflict returns true if two sorts can't be used together (e.g. VersionSortCodeASC and VersionSortCodeDESC).
func (VersionSort) String ¶ added in v1.0.0
func (s VersionSort) String() string
type Village ¶
type Village struct {
// contains filtered or unexported fields
}
func UnmarshalVillageFromDatabase ¶ added in v1.0.0
func UnmarshalVillageFromDatabase( id int, serverKey string, name string, points int, x int, y int, continent string, bonus int, playerID int, rawProfileURL string, createdAt time.Time, ) (Village, error)
UnmarshalVillageFromDatabase unmarshals Village from the database.
It should be used only for unmarshalling from the database! You can't use UnmarshalVillageFromDatabase as constructor - It may put domain into the invalid state!
func (Village) Base ¶ added in v1.0.0
func (v Village) Base() BaseVillage
func (Village) Meta ¶ added in v1.0.0
func (v Village) Meta() VillageMeta
func (Village) ProfileURL ¶ added in v0.2.0
func (Village) ToCursor ¶ added in v1.0.0
func (v Village) ToCursor() (VillageCursor, error)
func (Village) WithRelations ¶ added in v1.0.0
func (v Village) WithRelations(player NullPlayerMetaWithRelations) VillageWithRelations
type VillageCursor ¶ added in v1.0.0
type VillageCursor struct {
// contains filtered or unexported fields
}
func NewVillageCursor ¶ added in v1.0.0
func NewVillageCursor(id int, serverKey string) (VillageCursor, error)
func (VillageCursor) Encode ¶ added in v1.0.0
func (vc VillageCursor) Encode() string
func (VillageCursor) ID ¶ added in v1.0.0
func (vc VillageCursor) ID() int
func (VillageCursor) IsZero ¶ added in v1.0.0
func (vc VillageCursor) IsZero() bool
func (VillageCursor) ServerKey ¶ added in v1.0.0
func (vc VillageCursor) ServerKey() string
type VillageMeta ¶ added in v0.2.0
type VillageMeta struct {
// contains filtered or unexported fields
}
func UnmarshalVillageMetaFromDatabase ¶ added in v1.0.0
func UnmarshalVillageMetaFromDatabase( id int, name string, x int, y int, continent string, rawProfileURL string, ) (VillageMeta, error)
UnmarshalVillageMetaFromDatabase unmarshals VillageMeta from the database.
It should be used only for unmarshalling from the database! You can't use UnmarshalVillageMetaFromDatabase as constructor - It may put domain into the invalid state!
func (VillageMeta) Continent ¶ added in v0.2.0
func (v VillageMeta) Continent() string
func (VillageMeta) FullName ¶ added in v0.2.0
func (v VillageMeta) FullName() string
func (VillageMeta) ID ¶ added in v0.2.0
func (v VillageMeta) ID() int
func (VillageMeta) IsZero ¶ added in v1.0.0
func (v VillageMeta) IsZero() bool
func (VillageMeta) Name ¶ added in v0.2.0
func (v VillageMeta) Name() string
func (VillageMeta) ProfileURL ¶ added in v0.2.0
func (v VillageMeta) ProfileURL() *url.URL
func (VillageMeta) WithRelations ¶ added in v1.0.0
func (v VillageMeta) WithRelations(player NullPlayerMetaWithRelations) VillageMetaWithRelations
func (VillageMeta) X ¶ added in v0.2.0
func (v VillageMeta) X() int
func (VillageMeta) Y ¶ added in v0.2.0
func (v VillageMeta) Y() int
type VillageMetaWithRelations ¶ added in v0.8.0
type VillageMetaWithRelations struct {
// contains filtered or unexported fields
}
func (VillageMetaWithRelations) Player ¶ added in v0.8.0
func (v VillageMetaWithRelations) Player() NullPlayerMetaWithRelations
func (VillageMetaWithRelations) Village ¶ added in v1.0.0
func (v VillageMetaWithRelations) Village() VillageMeta
type VillageNotFoundError ¶
func (VillageNotFoundError) Code ¶
func (e VillageNotFoundError) Code() string
func (VillageNotFoundError) Error ¶
func (e VillageNotFoundError) Error() string
func (VillageNotFoundError) Params ¶ added in v1.0.0
func (e VillageNotFoundError) Params() map[string]any
func (VillageNotFoundError) Type ¶ added in v1.0.0
func (e VillageNotFoundError) Type() ErrorType
type VillageSort ¶ added in v1.0.0
type VillageSort uint8
const ( VillageSortIDASC VillageSort = iota + 1 VillageSortIDDESC VillageSortServerKeyASC VillageSortServerKeyDESC )
func (VillageSort) IsInConflict ¶ added in v1.0.0
func (s VillageSort) IsInConflict(s2 VillageSort) bool
IsInConflict returns true if two sorts can't be used together (e.g. VillageSortIDASC and VillageSortIDDESC).
func (VillageSort) String ¶ added in v1.0.0
func (s VillageSort) String() string
type VillageWithRelations ¶ added in v0.2.0
type VillageWithRelations struct {
// contains filtered or unexported fields
}
func (VillageWithRelations) IsZero ¶ added in v1.0.0
func (v VillageWithRelations) IsZero() bool
func (VillageWithRelations) Player ¶ added in v0.2.0
func (v VillageWithRelations) Player() NullPlayerMetaWithRelations
func (VillageWithRelations) Village ¶ added in v1.0.0
func (v VillageWithRelations) Village() Village
type Villages ¶ added in v1.0.0
type Villages []Village
func (Villages) Delete ¶ added in v1.0.0
func (vs Villages) Delete(serverKey string, active BaseVillages) []int
Delete finds all villages with the given serverKey that are not in the given slice with active villages and returns their ids. Both slices must be sorted in ascending order by ID + if vs contains villages from different servers. they must be sorted in ascending order by server key.
type VillagesSyncedEventPayload ¶ added in v1.0.0
type VillagesSyncedEventPayload struct {
// contains filtered or unexported fields
}
func NewVillagesSyncedEventPayload ¶ added in v1.0.0
func NewVillagesSyncedEventPayloadFromVillages ¶ added in v1.0.0
func NewVillagesSyncedEventPayloadFromVillages( serverKey string, serverURL *url.URL, versionCode string, villages BaseVillages, ) (VillagesSyncedEventPayload, error)
func (VillagesSyncedEventPayload) NumBarbarianVillages ¶ added in v1.0.0
func (p VillagesSyncedEventPayload) NumBarbarianVillages() int
func (VillagesSyncedEventPayload) NumBonusVillages ¶ added in v1.0.0
func (p VillagesSyncedEventPayload) NumBonusVillages() int
func (VillagesSyncedEventPayload) NumPlayerVillages ¶ added in v1.0.0
func (p VillagesSyncedEventPayload) NumPlayerVillages() int
func (VillagesSyncedEventPayload) NumVillages ¶ added in v1.0.0
func (p VillagesSyncedEventPayload) NumVillages() int
func (VillagesSyncedEventPayload) ServerKey ¶ added in v1.0.0
func (p VillagesSyncedEventPayload) ServerKey() string
func (VillagesSyncedEventPayload) ServerURL ¶ added in v1.0.0
func (p VillagesSyncedEventPayload) ServerURL() *url.URL
func (VillagesSyncedEventPayload) VersionCode ¶ added in v1.0.0
func (p VillagesSyncedEventPayload) VersionCode() string
type VillagesWithRelations ¶ added in v1.0.0
type VillagesWithRelations []VillageWithRelations
Source Files ¶
- base_ennoblement.go
- base_player.go
- base_server.go
- base_tribe.go
- base_village.go
- building_info.go
- coords.go
- ennoblement.go
- error.go
- message_payloads.go
- null.go
- opponents_defeated.go
- player.go
- player_snapshot.go
- server.go
- server_config.go
- server_map.go
- server_snapshot.go
- tribe.go
- tribe_change.go
- tribe_snapshot.go
- unit_info.go
- utils.go
- validation.go
- version.go
- village.go