Versions in this module Expand all Collapse all v0 v0.2019.11 Nov 2, 2019 Changes in this version + func EnableChallenge(db DB, flagID int) error type CapturedChallenge + Timestamp time.Time type ChallengeCaptureCount + FirstTeam *string + Timestamp *time.Time type ChallengeGuess + Points float32 type ChallengeSlice + func (cs ChallengeSlice) Sum() float32 + type ChallengeViewGroup struct + Category string + Challenges []ChallengeView + type CtfSolveResult struct + Category string + ChallengeID int + ChallengeName string + Points float32 + TeamID int + TeamName string + Timestamp time.Time + func ChallengeCapturesByTime(db DB, cutoffTime time.Time) ([]CtfSolveResult, error) + type OtherPointsView struct + CreatedAt time.Time + Points float32 + Reason string + Teams []string + func AllBonusPoints(db DB) ([]OtherPointsView, error) + type ServiceSlice []Service + func (ss ServiceSlice) Sum() float32 v0.2018.10 Oct 13, 2018 Changes in this version + const AlreadyCaptured + const ExitStatusFail + const ExitStatusPartial + const ExitStatusPass + const ExitStatusTimeout + const InvalidFlag + const TeamRoleAdmin + const TeamRoleBlueteam + const TeamRoleCtfCreator + const TeamRoleUnspecified + const ValidFlag + var DatabaseTables = []string + func GetPublicChallengeDescription(db DB, flagID int) (string, error) + func LatestScoreChange(db DB) (time.Time, error) + func LatestServiceCheckRun(db DB) (time.Time, error) + type BlueTeamStore struct + BlueteamIP int16 + Hash []byte + Name string + type BlueTeamStoreSlice []BlueTeamStore + func (teams BlueTeamStoreSlice) Insert(db TXer) error + type BlueteamView struct + BlueteamIP int16 + ID int + Name string + func AllBlueteams(db DB) ([]BlueteamView, error) + type CTFProgress struct + Amount int + Category string + Max int + func GetTeamCTFProgress(db DB, teamID int) ([]CTFProgress, error) + type CapturedChallenge struct + Category string + Designer string + Name string + type Challenge struct + Body string + Category string + CreatedAt time.Time + Designer string + Flag string + Hidden bool + ID int + ModifiedAt time.Time + Name string + Total float32 + func AllChallenges(db DB) ([]Challenge, error) + func ChallengeByFlag(db DB, flag string) (*Challenge, error) + func ChallengeByID(db DB, id int) (*Challenge, error) + func ChallengeByName(db DB, name string) (*Challenge, error) + func (c *Challenge) Delete(db DB) error + func (c *Challenge) Insert(db DB) error + func (c *Challenge) Update(db DB) error + type ChallengeCaptureCount struct + Category string + Count int + Designer string + Name string + func ChallengeCapturesPerFlag(db DB) ([]ChallengeCaptureCount, error) + type ChallengeGuess struct + Category string + Flag string + Name string + type ChallengeSlice []Challenge + func (cs ChallengeSlice) Insert(db TXer) error + type ChallengeView struct + Captured bool + Category string + ID int + Name string + Points int + func AllPublicChallenges(db DB, teamID int) ([]ChallengeView, error) + type CtfSolve struct + ChallengeID int + CreatedAt time.Time + TeamID int + func (cs *CtfSolve) Insert(db DB) error + type DB interface + CopyFrom func(tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int, error) + Exec func(string, ...interface{}) (pgx.CommandTag, error) + Query func(string, ...interface{}) (*pgx.Rows, error) + QueryRow func(string, ...interface{}) *pgx.Row + type DBClient interface + type Deleter interface + Delete func(DB) error + type ExitStatus uint16 + func (es *ExitStatus) Scan(src interface{}) error + func (es *ExitStatus) UnmarshalText(text []byte) error + func (es ExitStatus) MarshalText() ([]byte, error) + func (es ExitStatus) String() string + func (es ExitStatus) Value() (driver.Value, error) + type FlagState int + func CheckFlagSubmission(db TXer, ctx context.Context, team *Team, chal *ChallengeGuess) (FlagState, error) + type Inserter interface + Insert func(DB) error + type ManyInserter interface + Insert func(TXer) error + type MonitorTeamService struct + Service struct{ ... } + Team struct{ ... } + func MonitorTeamsAndServices(db DBClient) ([]MonitorTeamService, error) + type OtherPoints struct + CreatedAt time.Time + Points float32 + Reason string + TeamID int + func (op *OtherPoints) Insert(db DB) error + type OtherPointsSlice []OtherPoints + func (ops OtherPointsSlice) Insert(db TXer) error + type Service struct + Args []string + Category string + CreatedAt time.Time + Description string + Disabled bool + ID int + ModifiedAt time.Time + Name string + Points *float32 + Script string + StartsAt time.Time + TotalPoints float32 + func AllActiveServices(db DB) ([]Service, error) + func AllServices(db DB) ([]Service, error) + func ServiceByID(db DB, id int) (*Service, error) + func ServiceByName(db DB, name string) (*Service, error) + func (s *Service) Delete(db DB) error + func (s *Service) Insert(db DB) error + func (s *Service) Update(db DB) error + type ServiceCheck struct + CreatedAt time.Time + ExitCode int16 + ServiceID int + Status ExitStatus + TeamID int + type ServiceCheckSlice []ServiceCheck + func (sc ServiceCheckSlice) Insert(db DB) error + type TXer interface + Begin func() (Tx, error) + BeginEx func(context.Context, *pgx.TxOptions) (Tx, error) + type Team struct + BlueteamIP *int16 + Disabled bool + Hash []byte + ID int + Name string + RoleName TeamRole + func AllTeams(db DB) ([]Team, error) + func TeamByID(db DB, id int) (*Team, error) + func TeamByName(db DB, name string) (*Team, error) + func (t *Team) Delete(db DB) error + func (t *Team) Insert(db DB) error + func (t *Team) Update(db DB) error + type TeamCapturedChallenges struct + Challenges []CapturedChallenge + Team string + func ChallengeCapturesPerTeam(db DB) ([]TeamCapturedChallenges, error) + type TeamRole uint16 + func (tr *TeamRole) Scan(src interface{}) error + func (tr *TeamRole) UnmarshalText(text []byte) error + func (tr TeamRole) MarshalText() ([]byte, error) + func (tr TeamRole) String() string + func (tr TeamRole) Value() (driver.Value, error) + type TeamServiceStatusesView struct + ServiceID int + ServiceName string + Statuses []ExitStatus + func TeamServiceStatuses(db DB) ([]TeamServiceStatusesView, error) + type TeamsScoresResponse struct + Ctf int + Name string + Other int + Score int + Service int + TeamID int + func TeamsScores(db DB) ([]TeamsScoresResponse, error) + type Tx = *pgx.Tx + type Updater interface + Update func(DB) error