Documentation
¶
Index ¶
- Constants
- func AddDirectors(ctx context.Context, ts TournamentStore, us user.Store, id string, ...) error
- func AddDivision(ctx context.Context, ts TournamentStore, id string, division string) error
- func AddPlayers(ctx context.Context, ts TournamentStore, us user.Store, id string, ...) error
- func CheckIn(ctx context.Context, ts TournamentStore, tid string, playerid string) error
- func ClearReadyStates(ctx context.Context, ts TournamentStore, t *entity.Tournament, ...) error
- func DeletePairings(ctx context.Context, ts TournamentStore, id string, division string, round int) error
- func DivisionChannelName(tid, division string) string
- func ExportTournament(ctx context.Context, t *entity.Tournament, us user.Store, format string) (string, error)
- func GetXHRResponse(ctx context.Context, ts TournamentStore, id string) (*ipc.FullTournamentDivisions, error)
- func HandleTournamentGameEnded(ctx context.Context, ts TournamentStore, us user.Store, g *entity.Game, ...) error
- func IsFinished(ctx context.Context, ts TournamentStore, id string) (bool, error)
- func IsRoundComplete(ctx context.Context, ts TournamentStore, id string, division string, round int) (bool, error)
- func IsStarted(ctx context.Context, ts TournamentStore, id string) (bool, error)
- func NewTournament(ctx context.Context, tournamentStore TournamentStore, name string, ...) (*entity.Tournament, error)
- func PairRound(ctx context.Context, ts TournamentStore, id string, division string, round int, ...) error
- func PairingsToResponse(id string, division string, pairings []*ipc.Pairing, ...) *ipc.DivisionPairingsResponse
- func RemoveDirectors(ctx context.Context, ts TournamentStore, us user.Store, id string, ...) error
- func RemoveDivision(ctx context.Context, ts TournamentStore, id string, division string) error
- func RemovePlayers(ctx context.Context, ts TournamentStore, us user.Store, id string, ...) error
- func RenameDivision(ctx context.Context, ts TournamentStore, id string, division, newName string) error
- func SendTournamentMessage(ctx context.Context, ts TournamentStore, id string, ...) error
- func SetDivisionControls(ctx context.Context, ts TournamentStore, id string, division string, ...) error
- func SetFinished(ctx context.Context, ts TournamentStore, id string) error
- func SetPairings(ctx context.Context, ts TournamentStore, id string, division string, ...) error
- func SetReadyForGame(ctx context.Context, ts TournamentStore, t *entity.Tournament, ...) ([]string, bool, error)
- func SetResult(ctx context.Context, ts TournamentStore, us user.Store, id string, ...) error
- func SetRoundControls(ctx context.Context, ts TournamentStore, id string, division string, ...) error
- func SetSingleRoundControls(ctx context.Context, ts TournamentStore, id string, division string, round int, ...) error
- func SetTournamentMetadata(ctx context.Context, ts TournamentStore, meta *pb.TournamentMetadata, ...) error
- func StartAllRoundCountdowns(ctx context.Context, ts TournamentStore, id string, round int) error
- func StartRoundCountdown(ctx context.Context, ts TournamentStore, id string, division string, round int) error
- func TournamentDataResponse(ctx context.Context, ts TournamentStore, id string) (*ipc.TournamentDataResponse, error)
- func UncheckIn(ctx context.Context, ts TournamentStore, tid string) error
- type ClassicDivision
- func (t *ClassicDivision) AddPlayers(players *pb.TournamentPersons) (*pb.DivisionPairingsResponse, error)
- func (t *ClassicDivision) ChangeName(newName string)
- func (t *ClassicDivision) ClearReadyStates(playerID string, round, gameIndex int) ([]*pb.Pairing, error)
- func (t *ClassicDivision) DeletePairings(round int) error
- func (t *ClassicDivision) GetCurrentRound() int
- func (t *ClassicDivision) GetDivisionControls() *pb.DivisionControls
- func (t *ClassicDivision) GetNextPlayerMissingResult(round int) int32
- func (t *ClassicDivision) GetPlayers() *pb.TournamentPersons
- func (t *ClassicDivision) GetStandings(round int) (*pb.RoundStandings, int, error)
- func (t *ClassicDivision) GetXHRResponse() (*pb.TournamentDivisionDataResponse, error)
- func (t *ClassicDivision) IsFinished() (bool, error)
- func (t *ClassicDivision) IsRoundComplete(round int) (bool, error)
- func (t *ClassicDivision) IsRoundReady(round int) error
- func (t *ClassicDivision) IsRoundStartable() error
- func (t *ClassicDivision) IsStartable() bool
- func (t *ClassicDivision) IsStarted() bool
- func (t *ClassicDivision) PairRound(round int, preserveByes bool) (*pb.DivisionPairingsResponse, error)
- func (t *ClassicDivision) RecalculateStandings() (*pb.DivisionPairingsResponse, error)
- func (t *ClassicDivision) RemovePlayers(persons *pb.TournamentPersons) (*pb.DivisionPairingsResponse, error)
- func (t *ClassicDivision) ResetToBeginning() error
- func (t *ClassicDivision) SetDivisionControls(divisionControls *pb.DivisionControls) (*pb.DivisionControls, map[int32]*pb.RoundStandings, error)
- func (t *ClassicDivision) SetPairing(playerOne string, playerTwo string, round int, ...) (*pb.DivisionPairingsResponse, error)
- func (t *ClassicDivision) SetReadyForGame(playerID, connID string, round, gameIndex int, unready bool) ([]string, bool, error)
- func (t *ClassicDivision) SetRoundControls(roundControls []*pb.RoundControl) (*pb.DivisionPairingsResponse, []*pb.RoundControl, error)
- func (t *ClassicDivision) SetSingleRoundControls(round int, controls *pb.RoundControl) (*pb.RoundControl, error)
- func (t *ClassicDivision) StartRound(checkForStartable bool) error
- func (t *ClassicDivision) SubmitResult(round int, p1 string, p2 string, p1Score int, p2Score int, ...) (*pb.DivisionPairingsResponse, error)
- type PlayerSorter
- type TournamentService
- func (ts *TournamentService) AddDirectors(ctx context.Context, req *connect.Request[ipc.TournamentPersons]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) AddDivision(ctx context.Context, req *connect.Request[pb.TournamentDivisionRequest]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) AddPlayers(ctx context.Context, req *connect.Request[ipc.TournamentPersons]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) CheckIn(ctx context.Context, req *connect.Request[pb.CheckinRequest]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) CreateClubSession(ctx context.Context, req *connect.Request[pb.NewClubSessionRequest]) (*connect.Response[pb.ClubSessionResponse], error)
- func (ts *TournamentService) ExportTournament(ctx context.Context, req *connect.Request[pb.ExportTournamentRequest]) (*connect.Response[pb.ExportTournamentResponse], error)
- func (ts *TournamentService) FinishTournament(ctx context.Context, req *connect.Request[pb.FinishTournamentRequest]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) GetRecentClubSessions(ctx context.Context, req *connect.Request[pb.RecentClubSessionsRequest]) (*connect.Response[pb.ClubSessionsResponse], error)
- func (ts *TournamentService) GetTournament(ctx context.Context, req *connect.Request[pb.GetTournamentRequest]) (*connect.Response[ipc.FullTournamentDivisions], error)
- func (ts *TournamentService) GetTournamentMetadata(ctx context.Context, req *connect.Request[pb.GetTournamentMetadataRequest]) (*connect.Response[pb.TournamentMetadataResponse], error)
- func (ts *TournamentService) GetTournamentScorecards(ctx context.Context, req *connect.Request[pb.TournamentScorecardRequest]) (*connect.Response[pb.TournamentScorecardResponse], error)
- func (ts *TournamentService) NewTournament(ctx context.Context, req *connect.Request[pb.NewTournamentRequest]) (*connect.Response[pb.NewTournamentResponse], error)
- func (ts *TournamentService) PairRound(ctx context.Context, req *connect.Request[pb.PairRoundRequest]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) RecentGames(ctx context.Context, req *connect.Request[pb.RecentGamesRequest]) (*connect.Response[pb.RecentGamesResponse], error)
- func (ts *TournamentService) RemoveDirectors(ctx context.Context, req *connect.Request[ipc.TournamentPersons]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) RemoveDivision(ctx context.Context, req *connect.Request[pb.TournamentDivisionRequest]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) RemovePlayers(ctx context.Context, req *connect.Request[ipc.TournamentPersons]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) RenameDivision(ctx context.Context, req *connect.Request[pb.DivisionRenameRequest]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) SetDivisionControls(ctx context.Context, req *connect.Request[ipc.DivisionControls]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) SetEventChannel(c chan *entity.EventWrapper)
- func (ts *TournamentService) SetPairing(ctx context.Context, req *connect.Request[pb.TournamentPairingsRequest]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) SetResult(ctx context.Context, req *connect.Request[pb.TournamentResultOverrideRequest]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) SetRoundControls(ctx context.Context, req *connect.Request[ipc.DivisionRoundControls]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) SetSingleRoundControls(ctx context.Context, req *connect.Request[pb.SingleRoundControlsRequest]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) SetTournamentMetadata(ctx context.Context, req *connect.Request[pb.SetTournamentMetadataRequest]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) StartRoundCountdown(ctx context.Context, ...) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) UncheckIn(ctx context.Context, req *connect.Request[pb.UncheckInRequest]) (*connect.Response[pb.TournamentResponse], error)
- func (ts *TournamentService) UnstartTournament(ctx context.Context, req *connect.Request[pb.UnstartTournamentRequest]) (*connect.Response[pb.TournamentResponse], error)
- type TournamentStore
Constants ¶
const MaxDivisionNameLength = 24
Variables ¶
This section is empty.
Functions ¶
func AddDirectors ¶
func AddDirectors(ctx context.Context, ts TournamentStore, us user.Store, id string, directors *ipc.TournamentPersons) error
func AddDivision ¶
func AddPlayers ¶
func AddPlayers(ctx context.Context, ts TournamentStore, us user.Store, id string, division string, players *ipc.TournamentPersons) error
func ClearReadyStates ¶
func ClearReadyStates(ctx context.Context, ts TournamentStore, t *entity.Tournament, division, userID string, round, gameIndex int) error
func DeletePairings ¶
func DivisionChannelName ¶
DivisionChannelName returns a channel name that can be used for sending communications regarding a tournament and division.
func ExportTournament ¶
func GetXHRResponse ¶
func GetXHRResponse(ctx context.Context, ts TournamentStore, id string) (*ipc.FullTournamentDivisions, error)
func IsFinished ¶
func IsRoundComplete ¶
func NewTournament ¶
func NewTournament(ctx context.Context, tournamentStore TournamentStore, name string, description string, directors *ipc.TournamentPersons, ttype entity.CompetitionType, parent string, slug string, ) (*entity.Tournament, error)
func PairingsToResponse ¶
func PairingsToResponse(id string, division string, pairings []*ipc.Pairing, standings map[int32]*ipc.RoundStandings) *ipc.DivisionPairingsResponse
func RemoveDirectors ¶
func RemoveDirectors(ctx context.Context, ts TournamentStore, us user.Store, id string, directors *ipc.TournamentPersons) error
func RemoveDivision ¶
func RemovePlayers ¶
func RemovePlayers(ctx context.Context, ts TournamentStore, us user.Store, id string, division string, players *ipc.TournamentPersons) error
func RenameDivision ¶
func SendTournamentMessage ¶
func SendTournamentMessage(ctx context.Context, ts TournamentStore, id string, wrapped *entity.EventWrapper) error
SendTournamentMessage sends updated tournament information on the channel.
func SetDivisionControls ¶
func SetDivisionControls(ctx context.Context, ts TournamentStore, id string, division string, controls *ipc.DivisionControls) error
func SetFinished ¶
func SetFinished(ctx context.Context, ts TournamentStore, id string) error
func SetPairings ¶
func SetPairings(ctx context.Context, ts TournamentStore, id string, division string, pairings []*pb.TournamentPairingRequest) error
SetPairings is only called by the API
func SetReadyForGame ¶
func SetResult ¶
func SetResult(ctx context.Context, ts TournamentStore, us user.Store, id string, division string, playerOneId string, playerTwoId string, playerOneScore int, playerTwoScore int, playerOneResult ipc.TournamentGameResult, playerTwoResult ipc.TournamentGameResult, reason ipc.GameEndReason, round int, gameIndex int, amendment bool, g *entity.Game, queries *models.Queries) error
SetResult sets the result for the game. Note: playerOne and playerTwo went first and second, respectively.
func SetRoundControls ¶
func SetRoundControls(ctx context.Context, ts TournamentStore, id string, division string, roundControls []*ipc.RoundControl) error
func SetSingleRoundControls ¶
func SetSingleRoundControls(ctx context.Context, ts TournamentStore, id string, division string, round int, controls *ipc.RoundControl) error
func SetTournamentMetadata ¶
func SetTournamentMetadata(ctx context.Context, ts TournamentStore, meta *pb.TournamentMetadata, merge bool) error
func StartAllRoundCountdowns ¶
func StartRoundCountdown ¶
func TournamentDataResponse ¶
func TournamentDataResponse(ctx context.Context, ts TournamentStore, id string) (*ipc.TournamentDataResponse, error)
Types ¶
type ClassicDivision ¶
type ClassicDivision struct { TournamentName string `json:"tournamentName"` DivisionName string `json:"divisionName"` Matrix [][]string `json:"matrix"` PairingMap map[string]*pb.Pairing `json:"pairingMap"` // By convention, players should look like userUUID:username Players *pb.TournamentPersons `json:"players"` PlayerIndexMap map[string]int32 `json:"pidxMap"` Standings map[int32]*pb.RoundStandings `json:"standings"` RoundControls []*pb.RoundControl `json:"roundControls"` DivisionControls *pb.DivisionControls `json:"divisionControls"` CurrentRound int32 `json:"currentRound"` PairingKeyInt int `json:"pairingKeyInt"` }
func NewClassicDivision ¶
func NewClassicDivision(tournamentName string, divisionName string) *ClassicDivision
func (*ClassicDivision) AddPlayers ¶
func (t *ClassicDivision) AddPlayers(players *pb.TournamentPersons) (*pb.DivisionPairingsResponse, error)
func (*ClassicDivision) ChangeName ¶
func (t *ClassicDivision) ChangeName(newName string)
func (*ClassicDivision) ClearReadyStates ¶
func (*ClassicDivision) DeletePairings ¶
func (t *ClassicDivision) DeletePairings(round int) error
func (*ClassicDivision) GetCurrentRound ¶
func (t *ClassicDivision) GetCurrentRound() int
func (*ClassicDivision) GetDivisionControls ¶
func (t *ClassicDivision) GetDivisionControls() *pb.DivisionControls
func (*ClassicDivision) GetNextPlayerMissingResult ¶
func (t *ClassicDivision) GetNextPlayerMissingResult(round int) int32
func (*ClassicDivision) GetPlayers ¶
func (t *ClassicDivision) GetPlayers() *pb.TournamentPersons
func (*ClassicDivision) GetStandings ¶
func (t *ClassicDivision) GetStandings(round int) (*pb.RoundStandings, int, error)
func (*ClassicDivision) GetXHRResponse ¶
func (t *ClassicDivision) GetXHRResponse() (*pb.TournamentDivisionDataResponse, error)
func (*ClassicDivision) IsFinished ¶
func (t *ClassicDivision) IsFinished() (bool, error)
func (*ClassicDivision) IsRoundComplete ¶
func (t *ClassicDivision) IsRoundComplete(round int) (bool, error)
func (*ClassicDivision) IsRoundReady ¶
func (t *ClassicDivision) IsRoundReady(round int) error
func (*ClassicDivision) IsRoundStartable ¶
func (t *ClassicDivision) IsRoundStartable() error
func (*ClassicDivision) IsStartable ¶
func (t *ClassicDivision) IsStartable() bool
func (*ClassicDivision) IsStarted ¶
func (t *ClassicDivision) IsStarted() bool
func (*ClassicDivision) PairRound ¶
func (t *ClassicDivision) PairRound(round int, preserveByes bool) (*pb.DivisionPairingsResponse, error)
func (*ClassicDivision) RecalculateStandings ¶
func (t *ClassicDivision) RecalculateStandings() (*pb.DivisionPairingsResponse, error)
func (*ClassicDivision) RemovePlayers ¶
func (t *ClassicDivision) RemovePlayers(persons *pb.TournamentPersons) (*pb.DivisionPairingsResponse, error)
func (*ClassicDivision) ResetToBeginning ¶
func (t *ClassicDivision) ResetToBeginning() error
func (*ClassicDivision) SetDivisionControls ¶
func (t *ClassicDivision) SetDivisionControls(divisionControls *pb.DivisionControls) (*pb.DivisionControls, map[int32]*pb.RoundStandings, error)
func (*ClassicDivision) SetPairing ¶
func (t *ClassicDivision) SetPairing(playerOne string, playerTwo string, round int, selfPlayResult pb.TournamentGameResult) (*pb.DivisionPairingsResponse, error)
func (*ClassicDivision) SetReadyForGame ¶
func (t *ClassicDivision) SetReadyForGame(playerID, connID string, round, gameIndex int, unready bool) ([]string, bool, error)
SetReadyForGame sets the playerID with the given connID to be ready for the game with the given 0-based round (and gameIndex, optionally). If `unready` is passed in, we make the player unready. It returns a list of playerId:username:connIDs involved in the game, a boolean saying if they're ready, and an optional error.
func (*ClassicDivision) SetRoundControls ¶
func (t *ClassicDivision) SetRoundControls(roundControls []*pb.RoundControl) (*pb.DivisionPairingsResponse, []*pb.RoundControl, error)
func (*ClassicDivision) SetSingleRoundControls ¶
func (t *ClassicDivision) SetSingleRoundControls(round int, controls *pb.RoundControl) (*pb.RoundControl, error)
func (*ClassicDivision) StartRound ¶
func (t *ClassicDivision) StartRound(checkForStartable bool) error
func (*ClassicDivision) SubmitResult ¶
func (t *ClassicDivision) SubmitResult(round int, p1 string, p2 string, p1Score int, p2Score int, p1Result pb.TournamentGameResult, p2Result pb.TournamentGameResult, reason pb.GameEndReason, amend bool, gameIndex int, gid string) (*pb.DivisionPairingsResponse, error)
type PlayerSorter ¶
type PlayerSorter []*pb.TournamentPerson
func (PlayerSorter) Len ¶
func (a PlayerSorter) Len() int
func (PlayerSorter) Less ¶
func (a PlayerSorter) Less(i, j int) bool
func (PlayerSorter) Swap ¶
func (a PlayerSorter) Swap(i, j int)
type TournamentService ¶
type TournamentService struct {
// contains filtered or unexported fields
}
TournamentService is a service that contains functions that allow directors to interact with their tournaments
func NewTournamentService ¶
func NewTournamentService(ts TournamentStore, us user.Store, cfg *config.Config, lc *lambda.Client, q *models.Queries) *TournamentService
NewTournamentService creates a TournamentService
func (*TournamentService) AddDirectors ¶
func (ts *TournamentService) AddDirectors(ctx context.Context, req *connect.Request[ipc.TournamentPersons]) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) AddDivision ¶
func (ts *TournamentService) AddDivision(ctx context.Context, req *connect.Request[pb.TournamentDivisionRequest], ) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) AddPlayers ¶
func (ts *TournamentService) AddPlayers(ctx context.Context, req *connect.Request[ipc.TournamentPersons]) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) CheckIn ¶
func (ts *TournamentService) CheckIn(ctx context.Context, req *connect.Request[pb.CheckinRequest]) (*connect.Response[pb.TournamentResponse], error)
CheckIn does not require director permission.
func (*TournamentService) CreateClubSession ¶
func (ts *TournamentService) CreateClubSession(ctx context.Context, req *connect.Request[pb.NewClubSessionRequest], ) (*connect.Response[pb.ClubSessionResponse], error)
func (*TournamentService) ExportTournament ¶
func (ts *TournamentService) ExportTournament(ctx context.Context, req *connect.Request[pb.ExportTournamentRequest]) (*connect.Response[pb.ExportTournamentResponse], error)
func (*TournamentService) FinishTournament ¶
func (ts *TournamentService) FinishTournament(ctx context.Context, req *connect.Request[pb.FinishTournamentRequest]) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) GetRecentClubSessions ¶
func (ts *TournamentService) GetRecentClubSessions(ctx context.Context, req *connect.Request[pb.RecentClubSessionsRequest]) (*connect.Response[pb.ClubSessionsResponse], error)
func (*TournamentService) GetTournament ¶
func (ts *TournamentService) GetTournament(ctx context.Context, req *connect.Request[pb.GetTournamentRequest], ) (*connect.Response[ipc.FullTournamentDivisions], error)
func (*TournamentService) GetTournamentMetadata ¶
func (ts *TournamentService) GetTournamentMetadata(ctx context.Context, req *connect.Request[pb.GetTournamentMetadataRequest]) (*connect.Response[pb.TournamentMetadataResponse], error)
func (*TournamentService) GetTournamentScorecards ¶
func (ts *TournamentService) GetTournamentScorecards(ctx context.Context, req *connect.Request[pb.TournamentScorecardRequest], ) (*connect.Response[pb.TournamentScorecardResponse], error)
func (*TournamentService) NewTournament ¶
func (ts *TournamentService) NewTournament(ctx context.Context, req *connect.Request[pb.NewTournamentRequest]) (*connect.Response[pb.NewTournamentResponse], error)
func (*TournamentService) PairRound ¶
func (ts *TournamentService) PairRound(ctx context.Context, req *connect.Request[pb.PairRoundRequest]) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) RecentGames ¶
func (ts *TournamentService) RecentGames(ctx context.Context, req *connect.Request[pb.RecentGamesRequest]) (*connect.Response[pb.RecentGamesResponse], error)
func (*TournamentService) RemoveDirectors ¶
func (ts *TournamentService) RemoveDirectors(ctx context.Context, req *connect.Request[ipc.TournamentPersons]) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) RemoveDivision ¶
func (ts *TournamentService) RemoveDivision(ctx context.Context, req *connect.Request[pb.TournamentDivisionRequest]) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) RemovePlayers ¶
func (ts *TournamentService) RemovePlayers(ctx context.Context, req *connect.Request[ipc.TournamentPersons]) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) RenameDivision ¶
func (ts *TournamentService) RenameDivision(ctx context.Context, req *connect.Request[pb.DivisionRenameRequest]) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) SetDivisionControls ¶
func (ts *TournamentService) SetDivisionControls(ctx context.Context, req *connect.Request[ipc.DivisionControls]) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) SetEventChannel ¶
func (ts *TournamentService) SetEventChannel(c chan *entity.EventWrapper)
func (*TournamentService) SetPairing ¶
func (ts *TournamentService) SetPairing(ctx context.Context, req *connect.Request[pb.TournamentPairingsRequest], ) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) SetResult ¶
func (ts *TournamentService) SetResult(ctx context.Context, req *connect.Request[pb.TournamentResultOverrideRequest], ) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) SetRoundControls ¶
func (ts *TournamentService) SetRoundControls(ctx context.Context, req *connect.Request[ipc.DivisionRoundControls]) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) SetSingleRoundControls ¶
func (ts *TournamentService) SetSingleRoundControls(ctx context.Context, req *connect.Request[pb.SingleRoundControlsRequest]) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) SetTournamentMetadata ¶
func (ts *TournamentService) SetTournamentMetadata(ctx context.Context, req *connect.Request[pb.SetTournamentMetadataRequest]) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) StartRoundCountdown ¶
func (ts *TournamentService) StartRoundCountdown(ctx context.Context, req *connect.Request[pb.TournamentStartRoundCountdownRequest]) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) UncheckIn ¶
func (ts *TournamentService) UncheckIn(ctx context.Context, req *connect.Request[pb.UncheckInRequest]) (*connect.Response[pb.TournamentResponse], error)
func (*TournamentService) UnstartTournament ¶
func (ts *TournamentService) UnstartTournament(ctx context.Context, req *connect.Request[pb.UnstartTournamentRequest]) (*connect.Response[pb.TournamentResponse], error)
type TournamentStore ¶
type TournamentStore interface { Get(context.Context, string) (*entity.Tournament, error) GetBySlug(context.Context, string) (*entity.Tournament, error) Set(context.Context, *entity.Tournament) error Create(context.Context, *entity.Tournament) error GetRecentGames(ctx context.Context, tourneyID string, numGames int, offset int) (*pb.RecentGamesResponse, error) Unload(context.Context, string) SetTournamentEventChan(c chan<- *entity.EventWrapper) TournamentEventChan() chan<- *entity.EventWrapper ListAllIDs(context.Context) ([]string, error) GetRecentClubSessions(ctx context.Context, clubID string, numSessions int, offset int) (*pb.ClubSessionsResponse, error) AddRegistrants(ctx context.Context, tid string, userIDs []string, division string) error RemoveRegistrants(ctx context.Context, tid string, userIDs []string, division string) error RemoveRegistrantsForTournament(ctx context.Context, tid string) error ActiveTournamentsFor(ctx context.Context, userID string) ([][2]string, error) }