players

package
v0.0.0-...-8bc6207 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Player

type Player struct {
	Id          uint64 `json:"id"`
	Name        string `json:"name"`
	FileName    string `json:"file_name"`
	DateOfBirth int64  `json:"date_of_birth"`
	Captain     bool   `json:"captain"`
	Team        uint64 `json:"team"`
}

type PlayerRepo

type PlayerRepo interface {
	GetPlayerById(id uint64) (Player, error)
	ListAllPlayers() ([]Player, error)
	ListAllPlayersByTeamId(teamId uint64) ([]Player, error)
	AddPlayer(p *Player) (Player, error)
	EditPlayer(p *Player) (Player, error)
	DeletePlayer(id uint64) error
}

type Store

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

func NewStore

func NewStore(scope *gocb.Scope) *Store

func (*Store) AddPlayer

func (m *Store) AddPlayer(p *Player) error

func (*Store) DeletePlayer

func (m *Store) DeletePlayer(id uint64) error

func (*Store) EditPlayer

func (m *Store) EditPlayer(p *Player) error

func (*Store) GetPlayerById

func (m *Store) GetPlayerById(id uint64) (p Player, err error)

func (*Store) ListAllPlayers

func (m *Store) ListAllPlayers() (p []Player, err error)

func (*Store) ListAllPlayersByTeamId

func (m *Store) ListAllPlayersByTeamId(teamId uint64) (p []Player, err error)

Jump to

Keyboard shortcuts

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