Documentation
¶
Index ¶
- func Auth(contest string, username string, password string) *http.Cookie
- func ContestHandler(w http.ResponseWriter, r *http.Request)
- func ContestHandlerInit()
- func OpenDB() *sql.DB
- func ReadContestInit()
- func SaveSubmission(contest Contest, contestant Contestant, submissionFn string) int
- func ValidateTaskSubmit(t Task, r *http.Request) bool
- type Admin
- type Contest
- type Contestant
- type List
- type Manager
- type Session
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContestHandler ¶
func ContestHandler(w http.ResponseWriter, r *http.Request)
ContestHandler ... Nothing to see here
func ContestHandlerInit ¶
func ContestHandlerInit()
ContestHandlerInit ... Function that initializes the contest handler.
func ReadContestInit ¶
func ReadContestInit()
ReadContestInit prepares for reading contests from json and caching
func SaveSubmission ¶
func SaveSubmission(contest Contest, contestant Contestant, submissionFn string) int
SaveSubmission saves the submission to the database and returns the id
Types ¶
type Contest ¶
type Contest struct { ContestName string RealName string ID int Contestants []Contestant Tasks []Task Admins []Admin StartTime time.Time EndTime time.Time ContestEnded bool SubmissionsCount int }
Contest The contest type, as parsed from the contest.json
func ReadContest ¶
ReadContest ... Nothing to see here
func ReadContestFromDb ¶
ReadContestFromDb reads the contest from the database
type Contestant ¶
Contestant The contestant type, from the table contestants
type Session ¶
type Session struct { LoginName string Contest string Contestant Contestant }
Session is a session like in PHP, kind of
Click to show internal directories.
Click to hide internal directories.