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 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, 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 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.