repository

package
v0.0.0-...-ac404fd Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MatchRepository

type MatchRepository struct {
	Repository
}

func NewMatchRepository

func NewMatchRepository(dbConn *sql.DB) *MatchRepository

func (*MatchRepository) Create

func (r *MatchRepository) Create(ctx context.Context, match *entity.Match) error

func (*MatchRepository) FindAll

func (r *MatchRepository) FindAll(ctx context.Context) ([]*entity.Match, error)

func (*MatchRepository) FindByID

func (r *MatchRepository) FindByID(ctx context.Context, id string) (*entity.Match, error)

func (*MatchRepository) SaveActions

func (r *MatchRepository) SaveActions(ctx context.Context, match *entity.Match, score float64) error

func (*MatchRepository) Update

func (r *MatchRepository) Update(ctx context.Context, match *entity.Match) error

type MyTeamRepository

type MyTeamRepository struct {
	Repository
}

func NewMyTeamRepository

func NewMyTeamRepository(dbConn *sql.DB) *MyTeamRepository

func (*MyTeamRepository) AddScore

func (m *MyTeamRepository) AddScore(ctx context.Context, myTeam *entity.MyTeam, score float64) error

func (*MyTeamRepository) Create

func (m *MyTeamRepository) Create(ctx context.Context, myTeam *entity.MyTeam) error

func (*MyTeamRepository) FindAllPlayers

func (m *MyTeamRepository) FindAllPlayers(ctx context.Context, teamID string) ([]entity.Player, error)

func (*MyTeamRepository) FindByID

func (m *MyTeamRepository) FindByID(ctx context.Context, id string) (*entity.MyTeam, error)

func (*MyTeamRepository) FindByIDForUpdate

func (m *MyTeamRepository) FindByIDForUpdate(ctx context.Context, id string) (*entity.MyTeam, error)

func (*MyTeamRepository) SavePlayers

func (m *MyTeamRepository) SavePlayers(ctx context.Context, myTeam *entity.MyTeam) error

type PlayerRepository

type PlayerRepository struct {
	Repository
}

func NewPlayerRepository

func NewPlayerRepository(dbConn *sql.DB) *PlayerRepository

func (*PlayerRepository) Create

func (r *PlayerRepository) Create(ctx context.Context, player *entity.Player) error

func (*PlayerRepository) FindAll

func (r *PlayerRepository) FindAll(ctx context.Context) ([]*entity.Player, error)

func (*PlayerRepository) FindAllByIDs

func (r *PlayerRepository) FindAllByIDs(ctx context.Context, ids []string) ([]entity.Player, error)

func (*PlayerRepository) FindByID

func (r *PlayerRepository) FindByID(ctx context.Context, id string) (*entity.Player, error)

func (*PlayerRepository) FindByIDForUpdate

func (r *PlayerRepository) FindByIDForUpdate(ctx context.Context, id string) (*entity.Player, error)

func (*PlayerRepository) Update

func (r *PlayerRepository) Update(ctx context.Context, player *entity.Player) error

type Repository

type Repository struct {
	*db.Queries
	// contains filtered or unexported fields
}

type TeamRepository

type TeamRepository struct {
	Repository
}

func NewTeamRepository

func NewTeamRepository(dbConn *sql.DB) *TeamRepository

func (*TeamRepository) AddScore

func (r *TeamRepository) AddScore(ctx context.Context, player *entity.Player, score float64) error

func (*TeamRepository) FindByID

func (r *TeamRepository) FindByID(ctx context.Context, id string) (*entity.Team, error)

Jump to

Keyboard shortcuts

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