Documentation ¶
Index ¶
- type Ennoblement
- type EnnoblementGetter
- type EnnoblementPublisher
- type EnnoblementRepository
- type Job
- type OpenServerConfigInfoGetter
- type Player
- func (p *Player) GetByServerKeyAndID(ctx context.Context, serverKey string, id int64, includeTribe bool) (domain.PlayerWithRelations, error)
- func (p *Player) List(ctx context.Context, params domain.ListPlayersParams) ([]domain.PlayerWithRelations, int64, error)
- func (p *Player) Refresh(ctx context.Context, key, url string) (int64, error)
- type PlayerGetter
- type PlayerLister
- type PlayerRepository
- type PlayerSnapshot
- type PlayerSnapshotRepository
- type Server
- func (s *Server) GetNormalByVersionCodeAndKey(ctx context.Context, versionCode, key string) (domain.Server, error)
- func (s *Server) List(ctx context.Context, params domain.ListServersParams) ([]domain.Server, int64, error)
- func (s *Server) Refresh(ctx context.Context, host, versionCode string) ([]domain.Server, error)
- func (s *Server) UpdateInfoAndConfig(ctx context.Context, key, url string) error
- func (s *Server) UpdateNumPlayers(ctx context.Context, key string, numPlayers int64) error
- func (s *Server) UpdateNumTribes(ctx context.Context, key string, numTribes int64) error
- func (s *Server) UpdateNumVillages(ctx context.Context, key string, numVillages int64) error
- func (s *Server) UpdatePlayerSnapshotsCreatedAt(ctx context.Context, key string) error
- func (s *Server) UpdateTribeSnapshotsCreatedAt(ctx context.Context, key string) error
- type ServerLister
- type ServerPublisher
- type ServerRepository
- type SnapshotPublisher
- type Tribe
- func (t *Tribe) GetByServerKeyAndID(ctx context.Context, serverKey string, id int64) (domain.Tribe, error)
- func (t *Tribe) GetByServerKeyAndTag(ctx context.Context, serverKey string, tag string) (domain.Tribe, error)
- func (t *Tribe) List(ctx context.Context, params domain.ListTribesParams) ([]domain.Tribe, int64, error)
- func (t *Tribe) Refresh(ctx context.Context, key, url string) (int64, error)
- func (t *Tribe) UpdateDominance(ctx context.Context, serverKey string, numPlayerVillages int64) error
- type TribeGetter
- type TribeLister
- type TribeRepository
- type TribeSnapshot
- type TribeSnapshotRepository
- type Version
- type VersionLister
- type VersionRepository
- type Village
- func (v *Village) GetByServerKeyAndID(ctx context.Context, serverKey string, id int64, ...) (domain.VillageWithRelations, error)
- func (v *Village) List(ctx context.Context, params domain.ListVillagesParams) ([]domain.VillageWithRelations, int64, error)
- func (v *Village) Refresh(ctx context.Context, key, url string) (domain.RefreshVillagesResult, error)
- type VillageGetter
- type VillageRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ennoblement ¶
type Ennoblement struct {
// contains filtered or unexported fields
}
func NewEnnoblement ¶
func NewEnnoblement(repo EnnoblementRepository, client EnnoblementGetter) *Ennoblement
func (*Ennoblement) List ¶
func (e *Ennoblement) List( ctx context.Context, params domain.ListEnnoblementsParams, ) ([]domain.EnnoblementWithRelations, int64, error)
type EnnoblementGetter ¶
type EnnoblementPublisher ¶
type EnnoblementPublisher interface {
CmdRefresh(ctx context.Context, payloads ...domain.RefreshEnnoblementsCmdPayload) error
}
type EnnoblementRepository ¶
type EnnoblementRepository interface { Create(ctx context.Context, params ...domain.CreateEnnoblementParams) error List( ctx context.Context, params domain.ListEnnoblementsParams, ) ([]domain.EnnoblementWithRelations, int64, error) }
type Job ¶ added in v0.3.0
type Job struct {
// contains filtered or unexported fields
}
func NewJob ¶ added in v0.3.0
func NewJob( versionSvc VersionLister, serverSvc ServerLister, serverPublisher ServerPublisher, ennoblementPublisher EnnoblementPublisher, snapshotPublisher SnapshotPublisher, ) *Job
func (*Job) CreateSnapshots ¶ added in v0.3.0
type OpenServerConfigInfoGetter ¶
type OpenServerConfigInfoGetter interface { GetOpenServers(ctx context.Context, baseURL string) ([]tw.Server, error) GetServerConfig(ctx context.Context, baseURL string) (tw.ServerConfig, error) GetBuildingInfo(ctx context.Context, baseURL string) (tw.BuildingInfo, error) GetUnitInfo(ctx context.Context, baseURL string) (tw.UnitInfo, error) }
type Player ¶
type Player struct {
// contains filtered or unexported fields
}
func NewPlayer ¶
func NewPlayer(repo PlayerRepository, client PlayerGetter) *Player
func (*Player) GetByServerKeyAndID ¶
type PlayerGetter ¶
type PlayerLister ¶ added in v0.3.0
type PlayerLister interface {
List(ctx context.Context, params domain.ListPlayersParams) ([]domain.PlayerWithRelations, int64, error)
}
type PlayerRepository ¶
type PlayerSnapshot ¶ added in v0.3.0
type PlayerSnapshot struct {
// contains filtered or unexported fields
}
func NewPlayerSnapshot ¶ added in v0.3.0
func NewPlayerSnapshot(repo PlayerSnapshotRepository, playerSvc PlayerLister) *PlayerSnapshot
type PlayerSnapshotRepository ¶ added in v0.3.0
type PlayerSnapshotRepository interface {
Create(ctx context.Context, params ...domain.CreatePlayerSnapshotParams) error
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(repo ServerRepository, client OpenServerConfigInfoGetter) *Server
func (*Server) GetNormalByVersionCodeAndKey ¶
func (*Server) UpdateInfoAndConfig ¶
func (*Server) UpdateNumPlayers ¶
func (*Server) UpdateNumTribes ¶
func (*Server) UpdateNumVillages ¶
func (*Server) UpdatePlayerSnapshotsCreatedAt ¶ added in v0.3.0
type ServerLister ¶
type ServerPublisher ¶
type ServerPublisher interface {
CmdRefresh(ctx context.Context, payloads ...domain.RefreshServersCmdPayload) error
}
type ServerRepository ¶
type ServerRepository interface { CreateOrUpdate(ctx context.Context, params ...domain.CreateServerParams) ([]domain.Server, error) List(ctx context.Context, params domain.ListServersParams) ([]domain.Server, int64, error) UpdateByKey(ctx context.Context, key string, params domain.UpdateServerParams) (domain.Server, error) }
type SnapshotPublisher ¶ added in v0.3.0
type SnapshotPublisher interface { CmdCreatePlayers(ctx context.Context, payloads ...domain.CreateSnapshotsCmdPayload) error CmdCreateTribes(ctx context.Context, payloads ...domain.CreateSnapshotsCmdPayload) error }
type Tribe ¶
type Tribe struct {
// contains filtered or unexported fields
}
func NewTribe ¶
func NewTribe(repo TribeRepository, client TribeGetter) *Tribe
func (*Tribe) GetByServerKeyAndID ¶
func (*Tribe) GetByServerKeyAndTag ¶
type TribeGetter ¶
type TribeLister ¶ added in v0.3.0
type TribeRepository ¶
type TribeRepository interface { CreateOrUpdate(ctx context.Context, params ...domain.CreateTribeParams) error UpdateDominance(ctx context.Context, serverKey string, numVillages int64) error DeleteByID(ctx context.Context, ids ...int64) error List(ctx context.Context, params domain.ListTribesParams) ([]domain.Tribe, int64, error) }
type TribeSnapshot ¶ added in v0.3.0
type TribeSnapshot struct {
// contains filtered or unexported fields
}
func NewTribeSnapshot ¶ added in v0.3.0
func NewTribeSnapshot(repo TribeSnapshotRepository, tribeSvc TribeLister) *TribeSnapshot
type TribeSnapshotRepository ¶ added in v0.3.0
type TribeSnapshotRepository interface {
Create(ctx context.Context, params ...domain.CreateTribeSnapshotParams) error
}
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
func NewVersion ¶
func NewVersion(repo VersionRepository) *Version
type VersionLister ¶
type VersionRepository ¶
type Village ¶
type Village struct {
// contains filtered or unexported fields
}
func NewVillage ¶
func NewVillage(repo VillageRepository, client VillageGetter) *Village
func (*Village) GetByServerKeyAndID ¶
type VillageGetter ¶
type VillageRepository ¶
type VillageRepository interface { CreateOrUpdate(ctx context.Context, params ...domain.CreateVillageParams) error List(ctx context.Context, params domain.ListVillagesParams) ([]domain.VillageWithRelations, int64, error) }
Click to show internal directories.
Click to hide internal directories.