Versions in this module Expand all Collapse all v0 v0.4.1 Apr 13, 2020 Changes in this version + func (t *TestGroup) DeleteResults(db db.DBContext) error + type JSONProblem struct + DisplayName string + ID int + Name string + type JSONProblemResult struct + BestSubmission int64 + FailedAttempts int + Penalty int + Score float64 + Solved bool + type JSONScoreboard struct + ContestID int + ContestType ContestType + ProblemBestSubmissions map[int]int64 + Problems []JSONProblem + Users []JSONUserResult + type JSONUserResult struct + ID string + ProblemResults map[int]JSONProblemResult + Rank int + SolvedProblems int + TotalPenalty int + TotalScore float64 + type Scoreboard struct + Contest *Contest + ProblemBestSubmissions map[int]int64 + Problems []*Problem + UserResults []*UserResult + func GetScoreboard(db db.DBContext, contest *Contest, problems []*Problem) (*Scoreboard, error) + func (s *Scoreboard) CSV(w io.Writer) error + func (s *Scoreboard) CSVScoresOnly(w io.Writer) error + func (s *Scoreboard) JSON() JSONScoreboard + type ScoreboardViewStatus string + const ScoreboardViewStatusNoScoreboard + const ScoreboardViewStatusPublic + const ScoreboardViewStatusUser + type UserResult struct + ProblemResults map[int]*ProblemResult + Rank int + SolvedProblems int + TotalPenalty int + TotalScore float64 + User *User v0.3.0 Apr 4, 2020 Changes in this version type ScoringMode + const ScoringModeMin v0.2.0 Mar 30, 2020 v0.1.3 Mar 26, 2020 Changes in this version + func (p *Problem) WriteFiles(db db.DBContext, files []*File) error + func (r *Problem) Verify() error + func (r *TestGroup) Hidden() bool + func (r *TestGroup) WriteTests(db db.DBContext, tests []*Test, override bool) error + func BatchInsertJobs(db db.DBContext, jobs ...*Job) error + func CollectUserProblemResults(db db.DBContext, userID string, problems []*Problem) (map[int]*ProblemResult, error) + func GetProblemByName(db db.DBContext, contestID int, name string) (*Problem, error) + func RejudgeCompile(db db.DBContext, subIDs ...int) error + func RejudgeRun(db db.DBContext, subIDs ...int) error + func RejudgeScore(db db.DBContext, subIDs ...int) error + type Config struct + EnableRegistration bool + SessionKey []byte + func GenerateConfig() (*Config, error) + func GetConfig(db db.DBContext) (*Config, error) + func (c *Config) Verify() error + func (c *Config) Write(db *db.DB) error + type ContestType string + const ContestTypeUnweighted + const ContestTypeWeighted + type JobType string + const JobTypeCompile + const JobTypeRun + const JobTypeScore + type Language string + const LanguageCpp + const LanguageGo + const LanguageJava + const LanguagePas + const LanguagePy2 + const LanguagePy3 + const LanguageRust + func LanguageByExt(ext string) (Language, error) + type PenaltyPolicy string + const PenaltyPolicyICPC + const PenaltyPolicyNone + const PenaltyPolicySubmitTime + type ProblemWithTestGroups struct + TestGroups []*TestGroup + func CollectTestGroups(db db.DBContext, problems []*Problem, private bool) ([]*ProblemWithTestGroups, error) + func (p *ProblemWithTestGroups) SubtaskScores() string + func (p *ProblemWithTestGroups) TotalScore() float64 + type QueueOverview struct + Compile int + Run int + Score int + func GetQueueOverview(db db.DBContext) (*QueueOverview, error) + func (q *QueueOverview) Total() int + type ScoringMode string + const ScoringModeBest + const ScoringModeDecay + const ScoringModeLast + const ScoringModeOnce + type TestGroupWithTests struct + Tests []*Test + func GetProblemTests(db db.DBContext, problemID int) ([]*TestGroupWithTests, error) + func GetProblemTestsMeta(db db.DBContext, problemID int) ([]*TestGroupWithTests, error) + func (tg *TestGroupWithTests) ComputeScore(results map[int]*TestResult) float64 + type TestScoringMode string + const TestScoringModeMin + const TestScoringModeProduct + const TestScoringModeSum