shared

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestConfig = struct {
	EnvKeyLocalstackEndpoint string
	EnvKeyBattleTableName    string
	EnvKeyGameTableName      string
	EnvKeyMonsterTableName   string
}{
	EnvKeyLocalstackEndpoint: "LOCALSTACK_ENDPOINT",
	EnvKeyBattleTableName:    "DDB_TABLE_BATTLE_NAME",
	EnvKeyGameTableName:      "DDB_TABLE_GAME_NAME",
	EnvKeyMonsterTableName:   "DDB_TABLE_MONSTER_NAME",
}

Functions

func NewLocalTestDDBClient

func NewLocalTestDDBClient() *dynamodb.DynamoDB

Types

type BattleStatsRow

type BattleStatsRow struct {
	Health    int `dynamodbav:"health"`
	MaxHealth int `dynamodbav:"max_health"`
	Attack    int `dynamodbav:"attack"`
	Defense   int `dynamodbav:"defense"`
	Speed     int `dynamodbav:"speed"`
}

type MonsterRow

type MonsterRow struct {
	ID            string         `dynamodbav:"id"`
	Name          string         `dynamodbav:"name"`
	BattleStats   BattleStatsRow `dynamodbav:"battle_stats"`
	AvatarURL     string         `dynamodbav:"avatar_url"`
	IsPartnerable int            `dynamodbav:"is_partnerable"`
}

func ToMonsterRow

func ToMonsterRow(m entity.Monster) MonsterRow

func (MonsterRow) ToMonster

func (r MonsterRow) ToMonster() *entity.Monster

Jump to

Keyboard shortcuts

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