Documentation ¶
Index ¶
- type Choice
- type Group
- func (g *Group) AddTribe(ctx context.Context, id, serverID, tribeTag string) (domain.GroupWithMonitors, error)
- func (g *Group) CleanUp(ctx context.Context) error
- func (g *Group) Create(ctx context.Context, params domain.CreateGroupParams) (domain.GroupWithMonitors, error)
- func (g *Group) Delete(ctx context.Context, id, serverID string) error
- func (g *Group) Execute(ctx context.Context) ([]domain.EnnoblementNotification, error)
- func (g *Group) Get(ctx context.Context, id, serverID string) (domain.GroupWithMonitors, error)
- func (g *Group) GetWithTribes(ctx context.Context, id, serverID string) (domain.GroupWithMonitorsAndTribes, error)
- func (g *Group) ListServer(ctx context.Context, serverID string) ([]domain.GroupWithMonitors, error)
- func (g *Group) RemoveTribe(ctx context.Context, id, serverID, tribeTag string) (domain.GroupWithMonitors, error)
- func (g *Group) SetBarbarians(ctx context.Context, id, serverID string, barbarians bool) (domain.GroupWithMonitors, error)
- func (g *Group) SetChannelGains(ctx context.Context, id, serverID, channel string) (domain.GroupWithMonitors, error)
- func (g *Group) SetChannelLosses(ctx context.Context, id, serverID, channel string) (domain.GroupWithMonitors, error)
- func (g *Group) SetInternals(ctx context.Context, id, serverID string, internals bool) (domain.GroupWithMonitors, error)
- func (g *Group) SetLanguageTag(ctx context.Context, id, serverID, languageTag string) (domain.GroupWithMonitors, error)
- type GroupRepository
- type TWHelpService
- type Village
- func (v *Village) TranslateCoords(ctx context.Context, params domain.TranslateVillageCoordsParams, page int32) (domain.TranslateVillageCoordsResult, error)
- func (v *Village) TranslateCoordsFromHash(ctx context.Context, paramsSHA256Hash string, page int32) (domain.TranslateVillageCoordsResult, error)
- type VillageRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Choice ¶
type Choice struct {
// contains filtered or unexported fields
}
func NewChoice ¶
func NewChoice(twhelpSvc TWHelpService) *Choice
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func NewGroup ¶
func NewGroup(repo GroupRepository, twhelpSvc TWHelpService, logger *zap.Logger, maxGroupsPerServer, maxMonitorsPerGroup int) *Group
func (*Group) Create ¶
func (g *Group) Create(ctx context.Context, params domain.CreateGroupParams) (domain.GroupWithMonitors, error)
func (*Group) GetWithTribes ¶ added in v0.4.0
func (*Group) ListServer ¶ added in v0.4.0
func (*Group) RemoveTribe ¶ added in v0.4.0
func (*Group) SetBarbarians ¶
func (*Group) SetChannelGains ¶
func (*Group) SetChannelLosses ¶
func (*Group) SetInternals ¶
func (*Group) SetLanguageTag ¶ added in v0.4.0
type GroupRepository ¶
type GroupRepository interface { Create(ctx context.Context, params domain.CreateGroupParams) (domain.GroupWithMonitors, error) Update(ctx context.Context, id string, params domain.UpdateGroupParams) (domain.GroupWithMonitors, error) AddMonitor(ctx context.Context, id string, tribeID int64) (domain.GroupWithMonitors, error) DeleteMonitors(ctx context.Context, id string, monitorID ...string) (domain.GroupWithMonitors, error) List(ctx context.Context, params domain.ListGroupsParams) ([]domain.GroupWithMonitors, error) Get(ctx context.Context, id string) (domain.GroupWithMonitors, error) Delete(ctx context.Context, id string) error DeleteMany(ctx context.Context, id ...string) error }
type TWHelpService ¶ added in v0.4.1
type TWHelpService interface { ListVersions(ctx context.Context) ([]domain.TWVersion, error) ListOpenServers(ctx context.Context, version string, offset, limit int32) ([]domain.TWServer, error) ListClosedServers(ctx context.Context, version string, offset, limit int32) ([]domain.TWServer, error) GetOpenServer(ctx context.Context, versionCode, serverKey string) (domain.TWServer, error) GetServer(ctx context.Context, versionCode, serverKey string) (domain.TWServer, error) GetTribeByID(ctx context.Context, versionCode, serverKey string, id int64) (domain.Tribe, error) GetExistingTribeByTag(ctx context.Context, versionCode, serverKey, tribeTag string) (domain.Tribe, error) ListTribesByTag(ctx context.Context, versionCode, serverKey string, tribeTags []string, offset, limit int32) ([]domain.Tribe, error) ListVillagesByCoords(ctx context.Context, versionCode, serverKey string, coords []string, offset, limit int32) ([]domain.Village, error) ListEnnoblementsSince(ctx context.Context, versionCode, serverKey string, since time.Time, offset, limit int32) ([]domain.Ennoblement, error) }
type Village ¶ added in v0.4.1
type Village struct {
// contains filtered or unexported fields
}
func NewVillage ¶ added in v0.4.1
func NewVillage(repo VillageRepository, twhelpSvc TWHelpService) *Village
func (*Village) TranslateCoords ¶ added in v0.4.1
func (v *Village) TranslateCoords( ctx context.Context, params domain.TranslateVillageCoordsParams, page int32, ) (domain.TranslateVillageCoordsResult, error)
func (*Village) TranslateCoordsFromHash ¶ added in v0.4.1
type VillageRepository ¶ added in v0.4.1
Click to show internal directories.
Click to hide internal directories.