adapter

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupBun

type GroupBun struct {
	// contains filtered or unexported fields
}

func NewGroupBun

func NewGroupBun(db *bun.DB) *GroupBun

func (*GroupBun) AddMonitor

func (g *GroupBun) AddMonitor(ctx context.Context, id string, tribeID int64) (domain.GroupWithMonitors, error)

func (*GroupBun) Create

func (*GroupBun) Delete

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

func (*GroupBun) DeleteMany

func (g *GroupBun) DeleteMany(ctx context.Context, ids ...string) error

func (*GroupBun) DeleteMonitors

func (g *GroupBun) DeleteMonitors(ctx context.Context, id string, monitorIDs ...string) (domain.GroupWithMonitors, error)

func (*GroupBun) Get

func (*GroupBun) List

func (*GroupBun) Update

type TWHelpHTTP

type TWHelpHTTP struct {
	// contains filtered or unexported fields
}

func NewTWHelpHTTP

func NewTWHelpHTTP(client *twhelp.Client) *TWHelpHTTP

func (*TWHelpHTTP) GetExistingTribeByTag

func (t *TWHelpHTTP) GetExistingTribeByTag(ctx context.Context, versionCode, serverKey, tribeTag string) (domain.Tribe, error)

func (*TWHelpHTTP) GetOpenServer

func (t *TWHelpHTTP) GetOpenServer(ctx context.Context, versionCode, serverKey string) (domain.TWServer, error)

func (*TWHelpHTTP) GetServer

func (t *TWHelpHTTP) GetServer(ctx context.Context, versionCode, serverKey string) (domain.TWServer, error)

func (*TWHelpHTTP) GetTribeByID

func (t *TWHelpHTTP) GetTribeByID(ctx context.Context, versionCode, serverKey string, id int64) (domain.Tribe, error)

func (*TWHelpHTTP) ListClosedServers

func (t *TWHelpHTTP) ListClosedServers(ctx context.Context, version string, offset, limit int32) ([]domain.TWServer, error)

func (*TWHelpHTTP) ListEnnoblementsSince

func (t *TWHelpHTTP) ListEnnoblementsSince(
	ctx context.Context,
	versionCode, serverKey string,
	since time.Time,
	offset, limit int32,
) ([]domain.Ennoblement, error)

func (*TWHelpHTTP) ListOpenServers

func (t *TWHelpHTTP) ListOpenServers(ctx context.Context, version string, offset, limit int32) ([]domain.TWServer, error)

func (*TWHelpHTTP) ListTribesByTag

func (t *TWHelpHTTP) ListTribesByTag(
	ctx context.Context,
	versionCode, serverKey string,
	tribeTags []string,
	offset, limit int32,
) ([]domain.Tribe, error)

func (*TWHelpHTTP) ListVersions

func (t *TWHelpHTTP) ListVersions(ctx context.Context) ([]domain.TWVersion, error)

func (*TWHelpHTTP) ListVillagesByCoords

func (t *TWHelpHTTP) ListVillagesByCoords(
	ctx context.Context,
	versionCode, serverKey string,
	coords []string,
	offset, limit int32,
) ([]domain.Village, error)

type VillageRedis

type VillageRedis struct {
	// contains filtered or unexported fields
}

func NewVillageRedis

func NewVillageRedis(client redis.UniversalClient) *VillageRedis

func (*VillageRedis) GetTranslateCoordsParams

func (v *VillageRedis) GetTranslateCoordsParams(ctx context.Context, sha256Hash string) (domain.TranslateVillageCoordsParams, error)

func (*VillageRedis) SaveTranslateCoordsParams

func (v *VillageRedis) SaveTranslateCoordsParams(ctx context.Context, params domain.TranslateVillageCoordsParams) error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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