Documentation ¶
Index ¶
- type Choice
- type Group
- 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, 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 }
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) GetServer(ctx context.Context, version, server string) (twhelp.Server, error) GetTribeByID(ctx context.Context, version, server string, id int64) (twhelp.Tribe, error) GetTribeByTag(ctx context.Context, version, server, tag string) (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.