Documentation ¶
Index ¶
- type BattleRepository
- func (br *BattleRepository) AddBattle(battle *entity.Battle) (string, error)
- func (br *BattleRepository) LoadBattles() ([]*entity.Battle, error)
- func (br *BattleRepository) LoadEnemyById(enemyId string) (*entity.Enemy, error)
- func (br *BattleRepository) LoadPlayerById(playerId string) (*entity.Player, error)
- func (br *BattleRepository) SaveEnemyLife(enemy *entity.Enemy) error
- func (br *BattleRepository) SavePlayerLife(player *entity.Player) error
- type EnemyRepository
- func (er *EnemyRepository) AddEnemy(enemy *entity.Enemy) (string, error)
- func (er *EnemyRepository) DeleteEnemyById(id string) error
- func (er *EnemyRepository) LoadEnemies() ([]*entity.Enemy, error)
- func (er *EnemyRepository) LoadEnemyById(id string) (*entity.Enemy, error)
- func (er *EnemyRepository) LoadEnemyByNickname(nickname string) (*entity.Enemy, error)
- func (er *EnemyRepository) SaveEnemy(id string, enemy *entity.Enemy) error
- type PlayerRepository
- func (pr *PlayerRepository) AddPlayer(player *entity.Player) (string, error)
- func (pr *PlayerRepository) DeletePlayerById(id string) error
- func (pr *PlayerRepository) LoadPlayerById(id string) (*entity.Player, error)
- func (pr *PlayerRepository) LoadPlayerByNickname(nickname string) (*entity.Player, error)
- func (pr *PlayerRepository) LoadPlayers() ([]*entity.Player, error)
- func (pr *PlayerRepository) SavePlayer(id string, player *entity.Player) error
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)
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
Click to show internal directories.
Click to hide internal directories.