adapter

package
v0.13.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BunChecker added in v0.13.2

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

func NewBunChecker added in v0.13.2

func NewBunChecker(db *bun.DB) *BunChecker

func (*BunChecker) Check added in v0.13.2

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

func (*BunChecker) Name added in v0.13.2

func (c *BunChecker) Name() string

type EnnoblementBunRepository added in v0.13.2

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

func NewEnnoblementBunRepository added in v0.13.2

func NewEnnoblementBunRepository(db *bun.DB) *EnnoblementBunRepository

func (*EnnoblementBunRepository) Create added in v0.13.2

func (*EnnoblementBunRepository) Delete added in v0.13.2

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

func (*EnnoblementBunRepository) List added in v0.13.2

func (*EnnoblementBunRepository) ListCountWithRelations added in v0.13.2

type EnnoblementWatermillPublisher added in v0.13.2

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

func NewEnnoblementWatermillPublisher added in v0.13.2

func NewEnnoblementWatermillPublisher(publisher message.Publisher, marshaler WatermillMarshaler) *EnnoblementWatermillPublisher

func (*EnnoblementWatermillPublisher) CmdRefresh added in v0.13.2

type JSONWatermillMarshaler added in v0.13.2

type JSONWatermillMarshaler struct {
	NewUUID func() string
}

func (JSONWatermillMarshaler) Marshal added in v0.13.2

func (m JSONWatermillMarshaler) Marshal(v any) (*message.Message, error)

func (JSONWatermillMarshaler) Unmarshal added in v0.13.2

func (m JSONWatermillMarshaler) Unmarshal(msg *message.Message, v any) error

type PlayerBunRepository added in v0.13.2

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

func NewPlayerBunRepository added in v0.13.2

func NewPlayerBunRepository(db *bun.DB) *PlayerBunRepository

func (*PlayerBunRepository) CreateOrUpdate added in v0.13.2

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

func (*PlayerBunRepository) Delete added in v0.13.2

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

func (*PlayerBunRepository) List added in v0.13.2

func (*PlayerBunRepository) ListCountWithRelations added in v0.13.2

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

type PlayerSnapshotBunRepository added in v0.13.2

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

func NewPlayerSnapshotBunRepository added in v0.13.2

func NewPlayerSnapshotBunRepository(db *bun.DB) *PlayerSnapshotBunRepository

func (*PlayerSnapshotBunRepository) Create added in v0.13.2

func (*PlayerSnapshotBunRepository) Delete added in v0.13.2

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

func (*PlayerSnapshotBunRepository) List added in v0.13.2

func (*PlayerSnapshotBunRepository) ListCountWithRelations added in v0.13.2

type ServerBunRepository added in v0.13.2

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

func NewServerBunRepository added in v0.13.2

func NewServerBunRepository(db *bun.DB) *ServerBunRepository

func (*ServerBunRepository) CreateOrUpdate added in v0.13.2

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

func (*ServerBunRepository) List added in v0.13.2

func (*ServerBunRepository) ListCount added in v0.13.2

func (*ServerBunRepository) Update added in v0.13.2

type ServerWatermillPublisher added in v0.13.2

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

func NewServerWatermillPublisher added in v0.13.2

func NewServerWatermillPublisher(publisher message.Publisher, marshaler WatermillMarshaler) *ServerWatermillPublisher

func (*ServerWatermillPublisher) CmdRefresh added in v0.13.2

type SnapshotWatermillPublisher added in v0.13.2

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

func NewSnapshotWatermillPublisher added in v0.13.2

func NewSnapshotWatermillPublisher(publisher message.Publisher, marshaler WatermillMarshaler) *SnapshotWatermillPublisher

func (*SnapshotWatermillPublisher) CmdCreatePlayers added in v0.13.2

func (s *SnapshotWatermillPublisher) CmdCreatePlayers(ctx context.Context, payloads ...domain.CreateSnapshotsCmdPayload) error

func (*SnapshotWatermillPublisher) CmdCreateTribes added in v0.13.2

func (s *SnapshotWatermillPublisher) CmdCreateTribes(ctx context.Context, payloads ...domain.CreateSnapshotsCmdPayload) error

type TWHTTPClient added in v0.13.2

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

func NewTWHTTPClient added in v0.13.2

func NewTWHTTPClient(client *tw.Client) *TWHTTPClient

func (*TWHTTPClient) GetBuildingInfo added in v0.13.2

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

func (*TWHTTPClient) GetEnnoblements added in v0.13.2

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

func (*TWHTTPClient) GetOpenServers added in v0.13.2

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

func (*TWHTTPClient) GetPlayers added in v0.13.2

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

func (*TWHTTPClient) GetServerConfig added in v0.13.2

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

func (*TWHTTPClient) GetTribes added in v0.13.2

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

func (*TWHTTPClient) GetUnitInfo added in v0.13.2

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

func (*TWHTTPClient) GetVillages added in v0.13.2

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

type TribeBunRepository added in v0.13.2

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

func NewTribeBunRepository added in v0.13.2

func NewTribeBunRepository(db *bun.DB) *TribeBunRepository

func (*TribeBunRepository) CreateOrUpdate added in v0.13.2

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

func (*TribeBunRepository) Delete added in v0.13.2

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

func (*TribeBunRepository) List added in v0.13.2

func (*TribeBunRepository) ListCount added in v0.13.2

func (*TribeBunRepository) UpdateDominance added in v0.13.2

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

type TribeChangeBunRepository added in v0.13.2

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

func NewTribeChangeBunRepository added in v0.13.2

func NewTribeChangeBunRepository(db *bun.DB) *TribeChangeBunRepository

func (*TribeChangeBunRepository) Create added in v0.13.2

func (*TribeChangeBunRepository) List added in v0.13.2

func (*TribeChangeBunRepository) ListCountWithRelations added in v0.13.2

type TribeSnapshotBunRepository added in v0.13.2

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

func NewTribeSnapshotBunRepository added in v0.13.2

func NewTribeSnapshotBunRepository(db *bun.DB) *TribeSnapshotBunRepository

func (*TribeSnapshotBunRepository) Create added in v0.13.2

func (*TribeSnapshotBunRepository) Delete added in v0.13.2

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

func (*TribeSnapshotBunRepository) List added in v0.13.2

func (*TribeSnapshotBunRepository) ListCount added in v0.13.2

type VersionBunRepository added in v0.13.2

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

func NewVersionBunRepository added in v0.13.2

func NewVersionBunRepository(db *bun.DB) *VersionBunRepository

func (*VersionBunRepository) GetByCode added in v0.13.2

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

func (*VersionBunRepository) List added in v0.13.2

func (*VersionBunRepository) ListCount added in v0.13.2

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

type VillageBunRepository added in v0.13.2

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

func NewVillageBunRepository added in v0.13.2

func NewVillageBunRepository(db *bun.DB) *VillageBunRepository

func (*VillageBunRepository) CreateOrUpdate added in v0.13.2

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

func (*VillageBunRepository) List added in v0.13.2

func (*VillageBunRepository) ListCountWithRelations added in v0.13.2

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

type WatermillMarshaler added in v0.13.2

type WatermillMarshaler interface {
	Marshal(v any) (*message.Message, error)
	Unmarshal(msg *message.Message, v any) error
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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