player

package
v0.0.0-...-4db56dd Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: MIT Imports: 7 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          int         `db:"id" json:"id"`
	Name        string      `db:"name" json:"name"`
	FileName    null.String `db:"file_name" json:"file_name"`
	DateOfBirth null.Time   `db:"date_of_birth" json:"date_of_birth"`
	Position    null.String `db:"position" json:"position"`
	IsCaptain   bool        `db:"captain" json:"is_captain"`
	TeamID      int         `db:"team_id" json:"team_id"`
}

type Store

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

Store stores the dependencies

func NewPlayerRepo

func NewPlayerRepo(db *sqlx.DB) *Store

NewPlayerRepo stores our dependency

func (*Store) AddPlayer

func (s *Store) AddPlayer(ctx context.Context, playerParam Player) (Player, error)

func (*Store) DeletePlayer

func (s *Store) DeletePlayer(ctx context.Context, playerParam Player) error

func (*Store) EditPlayer

func (s *Store) EditPlayer(ctx context.Context, playerParam Player) (Player, error)

func (*Store) GetPlayer

func (s *Store) GetPlayer(ctx context.Context, playerParam Player) (Player, error)

func (*Store) GetPlayers

func (s *Store) GetPlayers(ctx context.Context) ([]Player, error)

func (*Store) GetPlayersTeam

func (s *Store) GetPlayersTeam(ctx context.Context, teamParam team.Team) ([]Player, error)

Jump to

Keyboard shortcuts

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