service

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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

func (*Choice) Versions

func (c *Choice) Versions(ctx context.Context) ([]domain.Choice, error)

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) AddTribe added in v0.4.0

func (g *Group) AddTribe(ctx context.Context, id, serverID, tribeTag string) (domain.GroupWithMonitors, error)

func (*Group) CleanUp added in v0.1.3

func (g *Group) CleanUp(ctx context.Context) error

func (*Group) Create

func (*Group) Delete

func (g *Group) Delete(ctx context.Context, id, serverID string) error

func (*Group) Execute added in v0.4.0

func (*Group) Get

func (g *Group) Get(ctx context.Context, id, serverID string) (domain.GroupWithMonitors, error)

func (*Group) GetWithTribes added in v0.4.0

func (g *Group) GetWithTribes(ctx context.Context, id, serverID string) (domain.GroupWithMonitorsAndTribes, error)

func (*Group) ListServer added in v0.4.0

func (g *Group) ListServer(ctx context.Context, serverID string) ([]domain.GroupWithMonitors, error)

func (*Group) RemoveTribe added in v0.4.0

func (g *Group) RemoveTribe(ctx context.Context, id, serverID, tribeTag string) (domain.GroupWithMonitors, error)

func (*Group) SetBarbarians

func (g *Group) SetBarbarians(ctx context.Context, id, serverID string, barbarians bool) (domain.GroupWithMonitors, error)

func (*Group) SetChannelGains

func (g *Group) SetChannelGains(ctx context.Context, id, serverID, channel string) (domain.GroupWithMonitors, error)

func (*Group) SetChannelLosses

func (g *Group) SetChannelLosses(ctx context.Context, id, serverID, channel string) (domain.GroupWithMonitors, error)

func (*Group) SetInternals

func (g *Group) SetInternals(ctx context.Context, id, serverID string, internals bool) (domain.GroupWithMonitors, error)

func (*Group) SetLanguageTag added in v0.4.0

func (g *Group) SetLanguageTag(ctx context.Context, id, serverID, languageTag string) (domain.GroupWithMonitors, error)

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)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL