battlestrg

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 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 Config

type Config struct {
	DynamoClient *dynamodb.DynamoDB `validate:"nonnil"`
	TableName    string             `validate:"nonzero"`
}

func (Config) Validate

func (c Config) Validate() error

type Storage

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

func New

func New(cfg Config) (*Storage, error)

New returns new instance of battlestrg dynamoDB Storage

func (*Storage) GetBattle

func (s *Storage) GetBattle(ctx context.Context, gameID string) (*entity.Battle, error)

func (*Storage) SaveBattle

func (s *Storage) SaveBattle(ctx context.Context, b entity.Battle) error

Jump to

Keyboard shortcuts

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