repository

package
v0.0.0-...-0457720 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BattleRepository

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

func NewBattleRepository

func NewBattleRepository(db *sql.DB) *BattleRepository

func (*BattleRepository) AddBattle

func (br *BattleRepository) AddBattle(battle *entity.Battle) (string, error)

func (*BattleRepository) LoadBattles

func (br *BattleRepository) LoadBattles() ([]*entity.Battle, error)

func (*BattleRepository) LoadEnemyById

func (br *BattleRepository) LoadEnemyById(enemyId string) (*entity.Enemy, error)

func (*BattleRepository) LoadPlayerById

func (br *BattleRepository) LoadPlayerById(playerId string) (*entity.Player, error)

func (*BattleRepository) SaveEnemyLife

func (br *BattleRepository) SaveEnemyLife(enemy *entity.Enemy) error

func (*BattleRepository) SavePlayerLife

func (br *BattleRepository) SavePlayerLife(player *entity.Player) error

type EnemyRepository

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

func NewEnemyRepository

func NewEnemyRepository(db *sql.DB) *EnemyRepository

func (*EnemyRepository) AddEnemy

func (er *EnemyRepository) AddEnemy(enemy *entity.Enemy) (string, error)

func (*EnemyRepository) DeleteEnemyById

func (er *EnemyRepository) DeleteEnemyById(id string) error

func (*EnemyRepository) LoadEnemies

func (er *EnemyRepository) LoadEnemies() ([]*entity.Enemy, error)

func (*EnemyRepository) LoadEnemyById

func (er *EnemyRepository) LoadEnemyById(id string) (*entity.Enemy, error)

func (*EnemyRepository) LoadEnemyByNickname

func (er *EnemyRepository) LoadEnemyByNickname(nickname string) (*entity.Enemy, error)

func (*EnemyRepository) SaveEnemy

func (er *EnemyRepository) SaveEnemy(id string, enemy *entity.Enemy) error

type PlayerRepository

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

func NewPlayerRepository

func NewPlayerRepository(db *sql.DB) *PlayerRepository

func (*PlayerRepository) AddPlayer

func (pr *PlayerRepository) AddPlayer(player *entity.Player) (string, error)

func (*PlayerRepository) DeletePlayerById

func (pr *PlayerRepository) DeletePlayerById(id string) error

func (*PlayerRepository) LoadPlayerById

func (pr *PlayerRepository) LoadPlayerById(id string) (*entity.Player, error)

func (*PlayerRepository) LoadPlayerByNickname

func (pr *PlayerRepository) LoadPlayerByNickname(nickname string) (*entity.Player, error)

func (*PlayerRepository) LoadPlayers

func (pr *PlayerRepository) LoadPlayers() ([]*entity.Player, error)

func (*PlayerRepository) SavePlayer

func (pr *PlayerRepository) SavePlayer(id string, player *entity.Player) error

Jump to

Keyboard shortcuts

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