shared

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertMonster

func InsertMonster(sqlClient *sqlx.DB, monsterRow MonsterRow) error

func NewTestSQLClient

func NewTestSQLClient() (*sqlx.DB, error)

Types

type MonsterRow

type MonsterRow struct {
	ID            string `db:"id"`
	Name          string `db:"name"`
	Health        int    `db:"health"`
	MaxHealth     int    `db:"max_health"`
	Attack        int    `db:"attack"`
	Defense       int    `db:"defense"`
	Speed         int    `db:"speed"`
	AvatarURL     string `db:"avatar_url"`
	IsPartnerable int    `db:"is_partnerable"`
}

func NewTestMonsterRow

func NewTestMonsterRow(isPartnerable bool) MonsterRow

func ToMonsterRow

func ToMonsterRow(monster *entity.Monster) *MonsterRow

func (*MonsterRow) ToMonster

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

type MonsterRows

type MonsterRows []MonsterRow

func (MonsterRows) ToMonsters

func (r MonsterRows) ToMonsters() []entity.Monster

Jump to

Keyboard shortcuts

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