Documentation ¶
Index ¶
- type Choice
- type Group
- func (g *Group) CleanUp(ctx context.Context) error
- func (g *Group) Create(ctx context.Context, params domain.CreateGroupParams) (domain.Group, error)
- func (g *Group) Delete(ctx context.Context, id, serverID string) error
- func (g *Group) Get(ctx context.Context, id, serverID string) (domain.Group, error)
- func (g *Group) List(ctx context.Context, params domain.ListGroupsParams) ([]domain.Group, error)
- func (g *Group) SetBarbarians(ctx context.Context, id, serverID string, barbarians bool) (domain.Group, error)
- func (g *Group) SetChannelGains(ctx context.Context, id, serverID, channel string) (domain.Group, error)
- func (g *Group) SetChannelLosses(ctx context.Context, id, serverID, channel string) (domain.Group, error)
- func (g *Group) SetInternals(ctx context.Context, id, serverID string, internals bool) (domain.Group, error)
- type GroupReader
- type GroupRepository
- type Monitor
- func (m *Monitor) Create(ctx context.Context, groupID, serverID, tribeTag string) (domain.Monitor, error)
- func (m *Monitor) Delete(ctx context.Context, id, serverID string) error
- func (m *Monitor) Execute(ctx context.Context) ([]domain.EnnoblementNotification, error)
- func (m *Monitor) List(ctx context.Context, groupID, serverID string) ([]domain.MonitorWithTribe, error)
- type MonitorRepository
- type TWHelpClient
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(client TWHelpClient) *Choice
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func NewGroup ¶
func NewGroup(repo GroupRepository, client TWHelpClient, logger *zap.Logger, maxGroupsPerServer int) *Group
func (*Group) SetBarbarians ¶
func (*Group) SetChannelGains ¶
func (*Group) SetChannelLosses ¶
type GroupReader ¶
type GroupRepository ¶
type GroupRepository interface { Create(ctx context.Context, params domain.CreateGroupParams) (domain.Group, error) Update(ctx context.Context, id, serverID string, params domain.UpdateGroupParams) (domain.Group, error) List(ctx context.Context, params domain.ListGroupsParams) ([]domain.Group, error) Get(ctx context.Context, id, serverID string) (domain.Group, error) Delete(ctx context.Context, id, serverID string) error DeleteMany(ctx context.Context, id ...string) error }
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
func NewMonitor ¶
func NewMonitor( repo MonitorRepository, groupSvc GroupReader, client TWHelpClient, logger *zap.Logger, maxMonitorsPerGroup int, ) *Monitor
type MonitorRepository ¶
type TWHelpClient ¶
type TWHelpClient interface { ListVersions(ctx context.Context) ([]twhelp.Version, error) ListServers(ctx context.Context, version string, params twhelp.ListServersQueryParams) ([]twhelp.Server, error) GetServer(ctx context.Context, version, server string) (twhelp.Server, error) ListTribes(ctx context.Context, version, server string, params twhelp.ListTribesQueryParams) ([]twhelp.Tribe, error) GetTribeByID(ctx context.Context, version, server string, id int64) (twhelp.Tribe, error) ListEnnoblements( ctx context.Context, version, server string, queryParams twhelp.ListEnnoblementsQueryParams, ) ([]twhelp.Ennoblement, error) }
Click to show internal directories.
Click to hide internal directories.