adapter

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataCleanupPublisher added in v1.0.0

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

func NewDataCleanupPublisher added in v1.0.0

func NewDataCleanupPublisher(
	publisher message.Publisher,
	marshaler watermillmsg.Marshaler,
	cmdCleanUpDataTopic string,
) *DataCleanupPublisher

func (*DataCleanupPublisher) CmdCleanUp added in v1.0.0

func (pub *DataCleanupPublisher) CmdCleanUp(
	ctx context.Context,
	payloads ...domain.CleanUpDataCmdPayload,
) error

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.IDB) *EnnoblementBunRepository

func (*EnnoblementBunRepository) CreateIfNotExists added in v1.8.0

func (repo *EnnoblementBunRepository) CreateIfNotExists(
	ctx context.Context,
	params ...domain.CreateEnnoblementParams,
) error

func (*EnnoblementBunRepository) Delete added in v0.13.2

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

func (*EnnoblementBunRepository) List added in v0.13.2

func (*EnnoblementBunRepository) ListWithRelations added in v1.0.0

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 watermillmsg.Marshaler,
	cmdSyncTopic string,
	eventSyncedTopic string,
) *EnnoblementWatermillPublisher

func (*EnnoblementWatermillPublisher) CmdSync added in v1.0.0

func (*EnnoblementWatermillPublisher) EventSynced added in v1.0.0

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.IDB) *PlayerBunRepository

func (*PlayerBunRepository) Count added in v1.1.0

func (*PlayerBunRepository) CreateOrUpdate added in v0.13.2

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

func (*PlayerBunRepository) Delete added in v0.13.2

func (repo *PlayerBunRepository) Delete(ctx context.Context, serverKey string, ids ...int) error

func (*PlayerBunRepository) List added in v0.13.2

func (*PlayerBunRepository) ListWithRelations added in v1.0.0

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.IDB) *PlayerSnapshotBunRepository

func (*PlayerSnapshotBunRepository) CreateIfNotExists added in v1.8.0

func (repo *PlayerSnapshotBunRepository) CreateIfNotExists(
	ctx context.Context,
	params ...domain.CreatePlayerSnapshotParams,
) error

func (*PlayerSnapshotBunRepository) Delete added in v0.13.2

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

func (*PlayerSnapshotBunRepository) List added in v0.13.2

func (*PlayerSnapshotBunRepository) ListWithRelations added in v1.0.0

type PlayerWatermillPublisher added in v1.0.0

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

func NewPlayerWatermillPublisher added in v1.0.0

func NewPlayerWatermillPublisher(
	publisher message.Publisher,
	marshaler watermillmsg.Marshaler,
	eventSyncedTopic string,
) *PlayerWatermillPublisher

func (*PlayerWatermillPublisher) EventSynced added in v1.0.0

func (pub *PlayerWatermillPublisher) EventSynced(
	ctx context.Context,
	payloads ...domain.PlayersSyncedEventPayload,
) error

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.IDB) *ServerBunRepository

func (*ServerBunRepository) CreateOrUpdate added in v0.13.2

func (repo *ServerBunRepository) CreateOrUpdate(ctx context.Context, params ...domain.CreateServerParams) error

func (*ServerBunRepository) List added in v0.13.2

func (*ServerBunRepository) Update added in v0.13.2

func (repo *ServerBunRepository) Update(ctx context.Context, key string, params domain.UpdateServerParams) error

type ServerSnapshotBunRepository added in v1.1.0

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

func NewServerSnapshotBunRepository added in v1.1.0

func NewServerSnapshotBunRepository(db bun.IDB) *ServerSnapshotBunRepository

func (*ServerSnapshotBunRepository) CreateIfNotExists added in v1.8.0

func (repo *ServerSnapshotBunRepository) CreateIfNotExists(
	ctx context.Context,
	params ...domain.CreateServerSnapshotParams,
) error

func (*ServerSnapshotBunRepository) Delete added in v1.1.0

func (repo *ServerSnapshotBunRepository) Delete(ctx context.Context, serverKey string, dateLTE time.Time) error

func (*ServerSnapshotBunRepository) List added in v1.1.0

func (*ServerSnapshotBunRepository) ListWithRelations added in v1.3.0

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 watermillmsg.Marshaler,
	cmdSyncTopic string,
	eventSyncedTopic string,
) *ServerWatermillPublisher

func (*ServerWatermillPublisher) CmdSync added in v1.0.0

func (*ServerWatermillPublisher) EventSynced added in v1.0.0

func (pub *ServerWatermillPublisher) EventSynced(
	ctx context.Context,
	payloads ...domain.ServerSyncedEventPayload,
) error

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 watermillmsg.Marshaler,
	cmdCreateTopic string,
	eventCreatedTopic string,
) *SnapshotWatermillPublisher

func (*SnapshotWatermillPublisher) CmdCreate added in v1.0.0

func (*SnapshotWatermillPublisher) EventCreated added in v1.0.0

func (pub *SnapshotWatermillPublisher) EventCreated(
	ctx context.Context,
	payloads ...domain.SnapshotsCreatedEventPayload,
) 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 *url.URL) (domain.BuildingInfo, error)

func (*TWHTTP) GetEnnoblements

func (t *TWHTTP) GetEnnoblements(
	ctx context.Context,
	baseURL *url.URL,
	since time.Time,
) (domain.BaseEnnoblements, error)

func (*TWHTTP) GetOpenServers

func (t *TWHTTP) GetOpenServers(ctx context.Context, baseURL *url.URL) (domain.BaseServers, error)

func (*TWHTTP) GetPlayers

func (t *TWHTTP) GetPlayers(ctx context.Context, baseURL *url.URL) (domain.BasePlayers, error)

func (*TWHTTP) GetServerConfig

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

func (*TWHTTP) GetTribes

func (t *TWHTTP) GetTribes(ctx context.Context, baseURL *url.URL) (domain.BaseTribes, error)

func (*TWHTTP) GetUnitInfo

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

func (*TWHTTP) GetVillages

func (t *TWHTTP) GetVillages(ctx context.Context, baseURL *url.URL) (domain.BaseVillages, 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.IDB) *TribeBunRepository

func (*TribeBunRepository) Count added in v1.1.0

func (repo *TribeBunRepository) Count(ctx context.Context, params domain.CountTribesParams) (int, error)

func (*TribeBunRepository) CreateOrUpdate added in v0.13.2

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

func (*TribeBunRepository) Delete added in v0.13.2

func (repo *TribeBunRepository) Delete(ctx context.Context, serverKey string, ids ...int) error

func (*TribeBunRepository) List added in v0.13.2

func (*TribeBunRepository) ListWithRelations added in v1.8.0

func (*TribeBunRepository) UpdateDominance added in v0.13.2

func (repo *TribeBunRepository) UpdateDominance(ctx context.Context, serverKey string, numPlayerVillages int) 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.IDB) *TribeChangeBunRepository

func (*TribeChangeBunRepository) CreateIfNotExists added in v1.8.0

func (repo *TribeChangeBunRepository) CreateIfNotExists(
	ctx context.Context,
	params ...domain.CreateTribeChangeParams,
) error

func (*TribeChangeBunRepository) Delete added in v1.11.0

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

func (*TribeChangeBunRepository) List added in v0.13.2

func (*TribeChangeBunRepository) ListWithRelations added in v1.0.0

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.IDB) *TribeSnapshotBunRepository

func (*TribeSnapshotBunRepository) CreateIfNotExists added in v1.8.0

func (repo *TribeSnapshotBunRepository) CreateIfNotExists(
	ctx context.Context,
	params ...domain.CreateTribeSnapshotParams,
) error

func (*TribeSnapshotBunRepository) Delete added in v0.13.2

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

func (*TribeSnapshotBunRepository) List added in v0.13.2

func (*TribeSnapshotBunRepository) ListWithRelations added in v1.0.0

type TribeWatermillPublisher added in v1.0.0

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

func NewTribeWatermillPublisher added in v1.0.0

func NewTribeWatermillPublisher(
	publisher message.Publisher,
	marshaler watermillmsg.Marshaler,
	eventSyncedTopic string,
) *TribeWatermillPublisher

func (*TribeWatermillPublisher) EventSynced added in v1.0.0

func (pub *TribeWatermillPublisher) EventSynced(
	ctx context.Context,
	payloads ...domain.TribesSyncedEventPayload,
) error

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.IDB) *VersionBunRepository

func (*VersionBunRepository) List added in v0.13.2

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.IDB) *VillageBunRepository

func (*VillageBunRepository) CreateOrUpdate added in v0.13.2

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

func (*VillageBunRepository) Delete added in v1.0.0

func (repo *VillageBunRepository) Delete(ctx context.Context, serverKey string, ids ...int) error

func (*VillageBunRepository) List added in v0.13.2

func (*VillageBunRepository) ListWithRelations added in v1.0.0

type VillageWatermillPublisher added in v1.0.0

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

func NewVillageWatermillPublisher added in v1.0.0

func NewVillageWatermillPublisher(
	publisher message.Publisher,
	marshaler watermillmsg.Marshaler,
	eventSyncedTopic string,
) *VillageWatermillPublisher

func (*VillageWatermillPublisher) EventSynced added in v1.0.0

func (pub *VillageWatermillPublisher) EventSynced(
	ctx context.Context,
	payloads ...domain.VillagesSyncedEventPayload,
) error

Jump to

Keyboard shortcuts

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