tournament

package
v0.0.0-...-3e6b536 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IUseCase

type IUseCase interface {
	GetTournamentByID(ctx context.Context, id int32) (db.Tournament, error)
	GetTournaments(ctx context.Context) ([]db.Tournament, error)
	CreateTournament(ctx context.Context, tournament db.CreateTournamentParams) (db.Tournament, error)
	CreateTournamentFromLichessID(ctx context.Context, lichessID string) (db.Tournament, error)
	GetTournamentsInProgress(ctx context.Context) ([]db.Tournament, error)
}

func NewUseCase

func NewUseCase(dbConn *pgxpool.Pool) IUseCase

type UseCase

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

func (*UseCase) CreateTournament

func (u *UseCase) CreateTournament(ctx context.Context, tournament db.CreateTournamentParams) (db.Tournament, error)

func (*UseCase) CreateTournamentFromLichessID

func (u *UseCase) CreateTournamentFromLichessID(ctx context.Context, lichessID string) (db.Tournament, error)

func (*UseCase) GetTournamentByID

func (u *UseCase) GetTournamentByID(ctx context.Context, id int32) (db.Tournament, error)

func (*UseCase) GetTournaments

func (u *UseCase) GetTournaments(_ context.Context) ([]db.Tournament, error)

func (*UseCase) GetTournamentsInProgress

func (u *UseCase) GetTournamentsInProgress(ctx context.Context) ([]db.Tournament, error)

Jump to

Keyboard shortcuts

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