# Functions
AllActiveServices retrieves all monitored services from 'cyboard.service'.
AllBlueteams fetches all non-disabled contestants from the database, along with their significant IP octet (the one octet that changes between teams, all the other octets are assumed to be the same).
AllBonusPoints returns all the bonus point totals, grouped by timestamp.
AllChallenges fetches all ctf challenges from the database, to be displayed to staff.
AllPublicChallenges fetches all non-hidden ctf challenges from the database, to be displayed to constestants.
AllServices retrieves all monitored services from 'cyboard.service'.
AllTeams fetches all teams (users) from the database.
ChallengeByFlag retrieves a row from 'cyboard.challenge' as a Challenge.
ChallengeByID retrieves a row from 'cyboard.challenge' as a Challenge.
ChallengeByName retrieves a row from 'cyboard.challenge' as a Challenge.
ChallengeCapturesByTime fetches all `ctf_solve` rows with their ctf name/info and solving team's name & id, and orders them by time.
ChallengeCapturesPerFlag gets the number of times each flag was captured, sorted by designer, then category, then name.
ChallengeCapturesPerTeam retrieves each team with the flags they've captured.
CheckFlagSubmission will award the team with a captured flag if their flag string guess is correct.
EnableChallenge updates a challenge, ensuring it is active for submission.
GetPublicChallengeDescription fetches a non-hidden challenge's description/body column.
GetTeamCTFProgress retrieves the given team's status in each ctf category, by counting the number of solved challenges out of the total amount of them.
LatestScoreChange retrieves the timestamp of the last event that changed any team's score.
LatestServiceCheckRun retrieves the timestamp of the last run of the service monitor.
MonitorTeamsAndServices fetches every active service and blueteam from the database, at the same time.
ServiceByID retrieves a row from 'cyboard.service' as a Service.
ServiceByName retrieves a row from 'cyboard.service' as a Service.
TeamByID retrieves a row from 'cyboard.team' as a Team.
TeamByName retrieves a row from 'cyboard.team' as a Team.
TeamServiceStatuses gets the current service status (pass, fail, timeout) for each team, for each service that has started and isn't disabled.
TeamsScores TODO.
# Constants
AlreadyCaptured is for flags that were claimed by the team already.
ExitStatusFail is the 'fail' ExitStatus.
ExitStatusPartial is the 'partial' ExitStatus.
ExitStatusPass is the 'pass' ExitStatus.
ExitStatusTimeout is the 'timeout' ExitStatus.
InvalidFlag is for bad guesses.
TeamRoleAdmin is the 'admin' TeamRole.
TeamRoleBlueteam is the 'blueteam' TeamRole.
TeamRoleCtfCreator is the 'ctf_creator' TeamRole.
TeamRoleUnspecified is an invalid TeamRole, likely bad user input.
ValidFlag is for successful guesses of flags which were not previously submitted.
# Variables
DatabaseTables is a list of every table for the schema 'cyboard'.
# Structs
BlueTeamStore contains the fields used to insert new blue teams into the database.
BlueteamView has the Team fields needed by the service monitor.
CapturedChallenge contains enough to identify a solved challenge.
Challenge represents a row from 'cyboard.challenge'.
ChallengeCaptureCount holds the number of teams that have beaten a CTF challenge, and the first team w/ timestamp to solve it.
ChallengeGuess is a blueteam's attempt to captured a flag.
ChallengeView is a safe-for-public-display subset of fields over a CTF challenge.
ChallengeViewGroup wraps a set of ChallengeViews, by their category (crypto, web, etc.).
CTFProgress holds a team's status for a ctf category.
CtfSolve represents a row from 'cyboard.ctf_solve'.
CtfSolveResult represents a solved challenge, associated with the solving team, via the pivot table 'ctf_solve'.
No description provided by the author
OtherPoints represents a row from 'cyboard.other_points'.
OtherPointsView groups together a row of other_points by timestamp.
Service represents a row from 'cyboard.service'.
ServiceCheck represents a row from 'cyboard.service_check'.
Team represents a row from 'cyboard.team'.
TeamCapturedChallenges holds the flags a team has captured.
TeamServiceStatusesView represents the current, calculated service's status (pass, fail, timeout), for all teams.
No description provided by the author
# Interfaces
DB is the common interface for database operations that can be used with types from schema 'cyboard'.
DBClient is a postgres session/engine/client.
No description provided by the author
No description provided by the author
No description provided by the author
TXer can start an isolated transaction in the database.
No description provided by the author
# Type aliases
BlueTeamStoreSlice is a list of blue teams, ready to be batch inserted.
ChallengeSlice is an array of challenges, suitable to insert many of at once.
ExitStatus is the 'exit_status' enum type from schema 'cyboard'.
FlagState represents the possibilities when user submits a flag guess.
OtherPointsSlice is an array of bonus points, suitable to insert many of at once.
ServiceCheckSlice is an array of ServiceChecks, suitable to insert many of at once.
No description provided by the author
TeamRole is the 'team_role' enum type from schema 'cyboard'.