repository

package
v0.0.0-...-60e5973 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPlayerNotFound      = errors.New("repository: the player was not found")
	ErrPlayerAlreadyExists = errors.New("repository: player already exists")
	ErrPlayerHasNoUpdates  = errors.New("repository: failed to update player")
)
View Source
var (
	ErrTeamNotFound      = errors.New("repository: the team was not found")
	ErrTeamAlreadyExists = errors.New("repository: team already exists")
	ErrTeamHasNoUpdates  = errors.New("repository: failed to update team")
)

Functions

This section is empty.

Types

type PlayerRepository

type PlayerRepository interface {
	Get(entity.Person) (*model.Player, error)
	GetTeams(entity.Person) ([]entity.Group, error)
	Add(*model.Player) error
	Update(*model.Player) error
}

PlayerRepository defines the interface for the player repository.

type TeamRepository

type TeamRepository interface {
	Get(entity.Group) (*model.Team, error)
	GetPlayers(entity.Group) ([]entity.Person, error)
	Add(*model.Team) error
	Update(*model.Team) error
}

TeamRepository defines the interface for the team repository.

Jump to

Keyboard shortcuts

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