adapter

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckerBun

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

func NewCheckerBun

func NewCheckerBun(db *bun.DB) *CheckerBun

func (*CheckerBun) Check

func (c *CheckerBun) Check(ctx context.Context) error

func (*CheckerBun) Name

func (c *CheckerBun) Name() string

type EnnoblementBun

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

func NewEnnoblementBun

func NewEnnoblementBun(db *bun.DB) *EnnoblementBun

func (*EnnoblementBun) Create

func (*EnnoblementBun) Delete

func (e *EnnoblementBun) Delete(ctx context.Context, serverKey string, createdAtLTE time.Time) error

func (*EnnoblementBun) List

func (*EnnoblementBun) ListCountWithRelations

func (e *EnnoblementBun) ListCountWithRelations(
	ctx context.Context,
	params domain.ListEnnoblementsParams,
) ([]domain.EnnoblementWithRelations, int64, error)

type PlayerBun

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

func NewPlayerBun

func NewPlayerBun(db *bun.DB) *PlayerBun

func (*PlayerBun) CreateOrUpdate

func (p *PlayerBun) CreateOrUpdate(ctx context.Context, params ...domain.CreatePlayerParams) error

func (*PlayerBun) Delete

func (p *PlayerBun) Delete(ctx context.Context, serverKey string, ids ...int64) error

func (*PlayerBun) List

func (p *PlayerBun) List(ctx context.Context, params domain.ListPlayersParams) ([]domain.Player, error)

func (*PlayerBun) ListCountWithRelations

func (p *PlayerBun) ListCountWithRelations(ctx context.Context, params domain.ListPlayersParams) ([]domain.PlayerWithRelations, int64, error)

type PlayerSnapshotBun

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

func NewPlayerSnapshotBun

func NewPlayerSnapshotBun(db *bun.DB) *PlayerSnapshotBun

func (*PlayerSnapshotBun) Create

func (*PlayerSnapshotBun) Delete

func (p *PlayerSnapshotBun) Delete(ctx context.Context, serverKey string, createdAtLTE time.Time) error

func (*PlayerSnapshotBun) List

func (*PlayerSnapshotBun) ListCountWithRelations

type ServerBun

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

func NewServerBun

func NewServerBun(db *bun.DB) *ServerBun

func (*ServerBun) CreateOrUpdate

func (s *ServerBun) CreateOrUpdate(ctx context.Context, params ...domain.CreateServerParams) ([]domain.Server, error)

func (*ServerBun) List

func (s *ServerBun) List(ctx context.Context, params domain.ListServersParams) ([]domain.Server, error)

func (*ServerBun) ListCount

func (s *ServerBun) ListCount(ctx context.Context, params domain.ListServersParams) ([]domain.Server, int64, error)

func (*ServerBun) Update

func (s *ServerBun) Update(ctx context.Context, key string, params domain.UpdateServerParams) (domain.Server, error)

type TWHTTP

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

func NewTWHTTP

func NewTWHTTP(client *tw.Client) *TWHTTP

func (*TWHTTP) GetBuildingInfo

func (t *TWHTTP) GetBuildingInfo(ctx context.Context, baseURL string) (domain.BuildingInfo, error)

func (*TWHTTP) GetEnnoblements

func (t *TWHTTP) GetEnnoblements(ctx context.Context, baseURL string, since time.Time) ([]domain.BaseEnnoblement, error)

func (*TWHTTP) GetOpenServers

func (t *TWHTTP) GetOpenServers(ctx context.Context, baseURL string) ([]domain.OpenServer, error)

func (*TWHTTP) GetPlayers

func (t *TWHTTP) GetPlayers(ctx context.Context, baseURL string) ([]domain.BasePlayer, error)

func (*TWHTTP) GetServerConfig

func (t *TWHTTP) GetServerConfig(ctx context.Context, baseURL string) (domain.ServerConfig, error)

func (*TWHTTP) GetTribes

func (t *TWHTTP) GetTribes(ctx context.Context, baseURL string) ([]domain.BaseTribe, error)

func (*TWHTTP) GetUnitInfo

func (t *TWHTTP) GetUnitInfo(ctx context.Context, baseURL string) (domain.UnitInfo, error)

func (*TWHTTP) GetVillages

func (t *TWHTTP) GetVillages(ctx context.Context, baseURL string) ([]domain.BaseVillage, error)

type TribeBun

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

func NewTribeBun

func NewTribeBun(db *bun.DB) *TribeBun

func (*TribeBun) CreateOrUpdate

func (t *TribeBun) CreateOrUpdate(ctx context.Context, params ...domain.CreateTribeParams) error

func (*TribeBun) Delete

func (t *TribeBun) Delete(ctx context.Context, serverKey string, ids ...int64) error

func (*TribeBun) List

func (t *TribeBun) List(ctx context.Context, params domain.ListTribesParams) ([]domain.Tribe, error)

func (*TribeBun) ListCount

func (t *TribeBun) ListCount(ctx context.Context, params domain.ListTribesParams) ([]domain.Tribe, int64, error)

func (*TribeBun) UpdateDominance

func (t *TribeBun) UpdateDominance(ctx context.Context, serverKey string, numPlayerVillages int64) error

type TribeChangeBun

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

func NewTribeChangeBun

func NewTribeChangeBun(db *bun.DB) *TribeChangeBun

func (*TribeChangeBun) Create

func (*TribeChangeBun) List

func (*TribeChangeBun) ListCountWithRelations

func (t *TribeChangeBun) ListCountWithRelations(
	ctx context.Context,
	params domain.ListTribeChangesParams,
) ([]domain.TribeChangeWithRelations, int64, error)

type TribeSnapshotBun

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

func NewTribeSnapshotBun

func NewTribeSnapshotBun(db *bun.DB) *TribeSnapshotBun

func (*TribeSnapshotBun) Create

func (*TribeSnapshotBun) Delete

func (t *TribeSnapshotBun) Delete(ctx context.Context, serverKey string, createdAtLTE time.Time) error

func (*TribeSnapshotBun) List

func (*TribeSnapshotBun) ListCount

type VersionBun

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

func NewVersionBun

func NewVersionBun(db *bun.DB) *VersionBun

func (*VersionBun) GetByCode

func (v *VersionBun) GetByCode(ctx context.Context, code string) (domain.Version, error)

func (*VersionBun) List

func (v *VersionBun) List(ctx context.Context) ([]domain.Version, error)

func (*VersionBun) ListCount

func (v *VersionBun) ListCount(ctx context.Context) ([]domain.Version, int64, error)

type VillageBun

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

func NewVillageBun

func NewVillageBun(db *bun.DB) *VillageBun

func (*VillageBun) CreateOrUpdate

func (v *VillageBun) CreateOrUpdate(ctx context.Context, params ...domain.CreateVillageParams) error

func (*VillageBun) List

func (*VillageBun) ListCountWithRelations

func (v *VillageBun) ListCountWithRelations(ctx context.Context, params domain.ListVillagesParams) ([]domain.VillageWithRelations, int64, error)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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