Documentation ¶
Index ¶
- type Player
- type PlayerRepository
- type PlayerRepositoryInMemory
- func (playerRepository *PlayerRepositoryInMemory) Create(player Player) (*Player, error)
- func (playerRepository *PlayerRepositoryInMemory) Delete(id int) error
- func (playerRepository *PlayerRepositoryInMemory) GetAll() []Player
- func (playerRepository *PlayerRepositoryInMemory) GetByID(id int) (*Player, error)
- func (playerRepository *PlayerRepositoryInMemory) Update(player Player) error
- type PlayerService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PlayerRepository ¶
type PlayerRepository interface { GetByID(id int) (*Player, error) GetAll() []Player Create(player Player) (*Player, error) Update(player Player) error Delete(id int) error }
func PlayerRepositoryInMemoryImpl ¶
func PlayerRepositoryInMemoryImpl() PlayerRepository
type PlayerRepositoryInMemory ¶
type PlayerRepositoryInMemory struct {
// contains filtered or unexported fields
}
func (*PlayerRepositoryInMemory) Create ¶
func (playerRepository *PlayerRepositoryInMemory) Create(player Player) (*Player, error)
func (*PlayerRepositoryInMemory) Delete ¶
func (playerRepository *PlayerRepositoryInMemory) Delete(id int) error
func (*PlayerRepositoryInMemory) GetAll ¶
func (playerRepository *PlayerRepositoryInMemory) GetAll() []Player
func (*PlayerRepositoryInMemory) GetByID ¶
func (playerRepository *PlayerRepositoryInMemory) GetByID(id int) (*Player, error)
func (*PlayerRepositoryInMemory) Update ¶
func (playerRepository *PlayerRepositoryInMemory) Update(player Player) error
type PlayerService ¶
type PlayerService struct {
// contains filtered or unexported fields
}
func PlayerServiceImpl ¶
func PlayerServiceImpl(repo PlayerRepository) *PlayerService
func (*PlayerService) CreatePlayer ¶
func (service *PlayerService) CreatePlayer(name string) (*Player, error)
Click to show internal directories.
Click to hide internal directories.