Documentation ¶
Index ¶
- Variables
- func FormatLimitOffset(limit int, offset int) string
- func Get[T any](pgconn *pgxpool.Pool, ctx context.Context, dest *T, query string, args ...any) error
- func Select[T any](pgconn *pgxpool.Pool, ctx context.Context, dest *[]*T, query string, ...) error
- type DB
- func (s *DB) AddContestEditor(ctx context.Context, contestID int, uid int) error
- func (s *DB) AddContestTester(ctx context.Context, contestID int, uid int) error
- func (s *DB) AddDonation(ctx context.Context, donation *kilonova.Donation) error
- func (s *DB) AddProblemEditor(ctx context.Context, pbid int, uid int) error
- func (s *DB) AddProblemViewer(ctx context.Context, pbid int, uid int) error
- func (s *DB) AnswerContestQuestion(ctx context.Context, questionID int, response string) error
- func (a *DB) Attachment(ctx context.Context, filter *kilonova.AttachmentFilter) (*kilonova.Attachment, error)
- func (a *DB) AttachmentData(ctx context.Context, filter *kilonova.AttachmentFilter) ([]byte, error)
- func (a *DB) Attachments(ctx context.Context, filter *kilonova.AttachmentFilter) ([]*kilonova.Attachment, error)
- func (s *DB) AuditLogCount(ctx context.Context) (int, error)
- func (s *DB) AuditLogs(ctx context.Context, limit, offset int) ([]*kilonova.AuditLog, error)
- func (s *DB) BiggestVID(ctx context.Context, problemID int) (int, error)
- func (s *DB) BlogPost(ctx context.Context, filter kilonova.BlogPostFilter) (*kilonova.BlogPost, error)
- func (s *DB) BlogPosts(ctx context.Context, filter kilonova.BlogPostFilter) ([]*kilonova.BlogPost, error)
- func (s *DB) BulkUpdateProblems(ctx context.Context, filter kilonova.ProblemFilter, upd kilonova.ProblemUpdate) error
- func (s *DB) BulkUpdateSubmissions(ctx context.Context, filter kilonova.SubmissionFilter, ...) error
- func (s *DB) ChildrenProblemListsByPblistID(ctx context.Context, pblistID int) ([]*kilonova.ProblemList, error)
- func (s *DB) CleanupSubTasks(ctx context.Context, pbid int) error
- func (s *DB) ClearUserContestSubmissions(ctx context.Context, contestID, userID int) error
- func (d *DB) Close() error
- func (s *DB) Contest(ctx context.Context, id int) (*kilonova.Contest, error)
- func (s *DB) ContestAnnouncement(ctx context.Context, id int) (*kilonova.ContestAnnouncement, error)
- func (s *DB) ContestAnnouncements(ctx context.Context, contestID int) ([]*kilonova.ContestAnnouncement, error)
- func (s *DB) ContestClassicLeaderboard(ctx context.Context, contest *kilonova.Contest, freezeTime *time.Time) (*kilonova.ContestLeaderboard, error)
- func (s *DB) ContestICPCLeaderboard(ctx context.Context, contest *kilonova.Contest, freezeTime *time.Time) (*kilonova.ContestLeaderboard, error)
- func (s *DB) ContestMaxScore(ctx context.Context, userid, problemid, contestid int, freezeTime *time.Time) decimal.Decimal
- func (s *DB) ContestProblems(ctx context.Context, contestID int) ([]*kilonova.Problem, error)
- func (s *DB) ContestQuestion(ctx context.Context, id int) (*kilonova.ContestQuestion, error)
- func (s *DB) ContestQuestions(ctx context.Context, filter QuestionFilter) ([]*kilonova.ContestQuestion, error)
- func (s *DB) ContestRegistration(ctx context.Context, contestID, userID int) (*kilonova.ContestRegistration, error)
- func (s *DB) ContestRegistrationCount(ctx context.Context, contestID int) (int, error)
- func (s *DB) ContestRegistrations(ctx context.Context, contestID int, fuzzyName *string, limit, offset int) ([]*kilonova.ContestRegistration, error)
- func (s *DB) CountBlogPosts(ctx context.Context, filter kilonova.BlogPostFilter) (int, error)
- func (s *DB) CountProblems(ctx context.Context, filter kilonova.ProblemFilter) (int, error)
- func (s *DB) CountUsers(ctx context.Context, filter kilonova.UserFilter) (int, error)
- func (s *DB) CreateAuditLog(ctx context.Context, msg string, authorID *int, system bool) (int, error)
- func (s *DB) CreateBlogPost(ctx context.Context, title string, authorID int) (int, string, error)
- func (a *DB) CreateBlogPostAttachment(ctx context.Context, att *kilonova.Attachment, postID int, data []byte, ...) error
- func (s *DB) CreateContest(ctx context.Context, name string) (int, error)
- func (s *DB) CreateContestAnnouncement(ctx context.Context, contestID int, text string) (int, error)
- func (s *DB) CreateContestQuestion(ctx context.Context, contestID, authorID int, text string) (int, error)
- func (s *DB) CreatePaste(ctx context.Context, p *kilonova.SubmissionPaste) error
- func (s *DB) CreateProblem(ctx context.Context, p *kilonova.Problem, authorID int) error
- func (a *DB) CreateProblemAttachment(ctx context.Context, att *kilonova.Attachment, problemID int, data []byte, ...) error
- func (s *DB) CreateProblemList(ctx context.Context, list *kilonova.ProblemList) error
- func (s *DB) CreatePwdResetRequest(ctx context.Context, id int) (string, error)
- func (s *DB) CreateSession(ctx context.Context, uid int) (string, error)
- func (s *DB) CreateSubTask(ctx context.Context, subtask *kilonova.SubTask) error
- func (s *DB) CreateSubmission(ctx context.Context, authorID int, problem *kilonova.Problem, ...) (int, error)
- func (s *DB) CreateTag(ctx context.Context, name string, tagType kilonova.TagType) (int, error)
- func (s *DB) CreateTest(ctx context.Context, test *kilonova.Test) error
- func (s *DB) CreateUser(ctx context.Context, name, passwordHash, email, preferredLanguage string, ...) (int, error)
- func (s *DB) CreateVerification(ctx context.Context, id int) (string, error)
- func (a *DB) DeleteAttachments(ctx context.Context, filter *kilonova.AttachmentFilter) (int, error)
- func (s *DB) DeleteBlogPost(ctx context.Context, id int) error
- func (s *DB) DeleteContest(ctx context.Context, id int) error
- func (s *DB) DeleteContestAnnouncement(ctx context.Context, announcementID int) error
- func (s *DB) DeleteContestRegistration(ctx context.Context, contestID, userID int) error
- func (s *DB) DeleteProblem(ctx context.Context, id int) error
- func (s *DB) DeleteProblemList(ctx context.Context, id int) error
- func (s *DB) DeleteProblemTests(ctx context.Context, problemID int) ([]int, error)
- func (s *DB) DeleteSubPaste(ctx context.Context, id string) error
- func (s *DB) DeleteSubTask(ctx context.Context, stid int) error
- func (s *DB) DeleteSubTasks(ctx context.Context, pbid int) error
- func (s *DB) DeleteSubmission(ctx context.Context, id int) error
- func (s *DB) DeleteTag(ctx context.Context, id int) error
- func (s *DB) DeleteTest(ctx context.Context, id int) error
- func (s *DB) DeleteUser(ctx context.Context, id int) error
- func (s *DB) Donations(ctx context.Context) ([]*kilonova.Donation, error)
- func (s *DB) ExtendSession(ctx context.Context, sid string) (time.Time, error)
- func (s *DB) GetPwdResetRequest(ctx context.Context, id string) (int, error)
- func (s *DB) GetSession(ctx context.Context, sess string) (int, error)
- func (s *DB) GetVerification(ctx context.Context, id string) (int, error)
- func (s *DB) InitSubmission(ctx context.Context, subID int) error
- func (s *DB) InsertContestRegistration(ctx context.Context, contestID, userID int) error
- func (s *DB) IsContestViewer(ctx context.Context, contestID, userID int) (bool, error)
- func (s *DB) IsFullProblemViewer(ctx context.Context, problemID, userID int) (bool, error)
- func (s *DB) IsPostViewer(ctx context.Context, postID, userID int) (bool, error)
- func (s *DB) IsProblemEditor(ctx context.Context, problemID, userID int) (bool, error)
- func (s *DB) IsProblemViewer(ctx context.Context, problemID, userID int) (bool, error)
- func (s *DB) LastUsernameChange(ctx context.Context, userID int) (time.Time, error)
- func (s *DB) ManyProblemsTags(ctx context.Context, problemIDs []int) (map[int][]*kilonova.Tag, error)
- func (s *DB) MaxScore(ctx context.Context, userid, problemid int) decimal.Decimal
- func (s *DB) MaxScoreSubID(ctx context.Context, userid, problemid int) (int, error)
- func (s *DB) MaximumScoreSubTaskTests(ctx context.Context, problemID int, userID int, contestID *int) ([]*kilonova.SubTest, error)
- func (s *DB) MaximumScoreSubTasks(ctx context.Context, problemID int, userID int, contestID *int) ([]*kilonova.SubmissionSubTask, error)
- func (s *DB) MergeTags(ctx context.Context, original int, toReplace []int) error
- func (s *DB) NameUsedBefore(ctx context.Context, name string) (bool, error)
- func (s *DB) NumBulkedSolvedPblistProblems(ctx context.Context, userID int, listIDs []int) (map[int]int, error)
- func (s *DB) NumSolvedPblistProblems(ctx context.Context, listID, userID int) (int, error)
- func (s *DB) ParentProblemListsByPblistID(ctx context.Context, pblistID int) ([]*kilonova.ProblemList, error)
- func (s *DB) Problem(ctx context.Context, id int) (*kilonova.Problem, error)
- func (s *DB) ProblemChecklist(ctx context.Context, problemID int) (*kilonova.ProblemChecklist, error)
- func (s *DB) ProblemEditors(ctx context.Context, pbid int) ([]*User, error)
- func (s *DB) ProblemList(ctx context.Context, id int) (*kilonova.ProblemList, error)
- func (s *DB) ProblemListByName(ctx context.Context, name string) (*kilonova.ProblemList, error)
- func (s *DB) ProblemLists(ctx context.Context, filter kilonova.ProblemListFilter) ([]*kilonova.ProblemList, error)
- func (s *DB) ProblemListsByProblemID(ctx context.Context, problemID int, showHidable bool) ([]*kilonova.ProblemList, error)
- func (s *DB) ProblemStatisticsMemory(ctx context.Context, problemID int) ([]*kilonova.Submission, error)
- func (s *DB) ProblemStatisticsSize(ctx context.Context, problemID int) ([]*kilonova.Submission, error)
- func (s *DB) ProblemStatisticsTime(ctx context.Context, problemID int) ([]*kilonova.Submission, error)
- func (s *DB) ProblemTags(ctx context.Context, problemID int) ([]*kilonova.Tag, error)
- func (s *DB) ProblemViewers(ctx context.Context, pbid int) ([]*User, error)
- func (s *DB) Problems(ctx context.Context, filter kilonova.ProblemFilter) ([]*kilonova.Problem, error)
- func (s *DB) ProblemsStatistics(ctx context.Context, problemIDs []int) (map[int]*ProblemStats, error)
- func (s *DB) RefreshHotProblems(ctx context.Context, bannedProblems []int) error
- func (s *DB) RefreshProblemStats(ctx context.Context) error
- func (s *DB) RelevantTags(ctx context.Context, tagID int, max int) ([]*kilonova.Tag, error)
- func (s *DB) RemainingSubmissionCount(ctx context.Context, contest *kilonova.Contest, problemID, userID int) (int, error)
- func (s *DB) RemovePwdResetRequest(ctx context.Context, req string) error
- func (s *DB) RemoveSession(ctx context.Context, sess string) error
- func (s *DB) RemoveTag(ctx context.Context, id int) error
- func (s *DB) RemoveVerification(ctx context.Context, verif string) error
- func (s *DB) ResetProblemSubmissions(ctx context.Context, problemID int) error
- func (s *DB) ResetSubmission(ctx context.Context, subID int) error
- func (s *DB) RunningContestsByProblem(ctx context.Context, problemID int) ([]*kilonova.Contest, error)
- func (s *DB) ScoredContestProblems(ctx context.Context, contestID int, userID int, freezeTime *time.Time) ([]*kilonova.ScoredProblem, error)
- func (s *DB) ScoredProblem(ctx context.Context, problemID int, userID int) (*kilonova.ScoredProblem, error)
- func (s *DB) ScoredProblems(ctx context.Context, filter kilonova.ProblemFilter, userID int) ([]*kilonova.ScoredProblem, error)
- func (s *DB) StartContestRegistration(ctx context.Context, contestID, userID int, startTime time.Time, ...) error
- func (s *DB) StripContestAccess(ctx context.Context, contestID int, uid int) error
- func (s *DB) StripProblemAccess(ctx context.Context, pbid int, uid int) error
- func (s *DB) SubTask(ctx context.Context, pbid, stvid int) (*kilonova.SubTask, error)
- func (s *DB) SubTaskByID(ctx context.Context, stid int) (*kilonova.SubTask, error)
- func (s *DB) SubTasks(ctx context.Context, pbid int) ([]*kilonova.SubTask, error)
- func (s *DB) SubTasksByTest(ctx context.Context, pbid, tid int) ([]*kilonova.SubTask, error)
- func (s *DB) SubTest(ctx context.Context, id int) (*kilonova.SubTest, error)
- func (s *DB) SubTestsBySubID(ctx context.Context, subid int) ([]*kilonova.SubTest, error)
- func (s *DB) Submission(ctx context.Context, id int) (*kilonova.Submission, error)
- func (s *DB) SubmissionCount(ctx context.Context, filter kilonova.SubmissionFilter) (int, error)
- func (s *DB) SubmissionLookingUser(ctx context.Context, id int, userID int) (*kilonova.Submission, error)
- func (s *DB) SubmissionPaste(ctx context.Context, id string) (*kilonova.SubmissionPaste, error)
- func (s *DB) SubmissionSubTasksBySubID(ctx context.Context, subid int) ([]*kilonova.SubmissionSubTask, error)
- func (s *DB) Submissions(ctx context.Context, filter kilonova.SubmissionFilter) ([]*kilonova.Submission, error)
- func (s *DB) Tag(ctx context.Context, id int) (*kilonova.Tag, error)
- func (s *DB) TagByLooseName(ctx context.Context, name string) (*kilonova.Tag, error)
- func (s *DB) TagByName(ctx context.Context, name string) (*kilonova.Tag, error)
- func (s *DB) Tags(ctx context.Context) ([]*kilonova.Tag, error)
- func (s *DB) TagsByID(ctx context.Context, tagIDs []int) ([]*kilonova.Tag, error)
- func (s *DB) TagsByType(ctx context.Context, tagType kilonova.TagType) ([]*kilonova.Tag, error)
- func (s *DB) Test(ctx context.Context, pbID, testVID int) (*kilonova.Test, error)
- func (s *DB) Tests(ctx context.Context, pbID int) ([]*kilonova.Test, error)
- func (a *DB) UpdateAttachment(ctx context.Context, id int, upd *kilonova.AttachmentUpdate) error
- func (a *DB) UpdateAttachmentData(ctx context.Context, id int, data []byte, updatedBy *int) error
- func (s *DB) UpdateBlogPost(ctx context.Context, id int, upd kilonova.BlogPostUpdate) error
- func (s *DB) UpdateContest(ctx context.Context, id int, upd kilonova.ContestUpdate) error
- func (s *DB) UpdateContestAnnouncement(ctx context.Context, announcementID int, text string) error
- func (s *DB) UpdateContestProblems(ctx context.Context, contestID int, problems []int) error
- func (s *DB) UpdateProblem(ctx context.Context, id int, upd kilonova.ProblemUpdate) error
- func (s *DB) UpdateProblemList(ctx context.Context, id int, upd kilonova.ProblemListUpdate) error
- func (s *DB) UpdateProblemListProblems(ctx context.Context, id int, problemIDs []int) error
- func (s *DB) UpdateProblemListSublists(ctx context.Context, id int, listIDs []int) error
- func (s *DB) UpdateProblemTags(ctx context.Context, problemID int, tagIDs []int) error
- func (s *DB) UpdateSubTask(ctx context.Context, id int, upd kilonova.SubTaskUpdate) error
- func (s *DB) UpdateSubTaskTests(ctx context.Context, id int, testIDs []int) error
- func (s *DB) UpdateSubTest(ctx context.Context, id int, upd kilonova.SubTestUpdate) error
- func (s *DB) UpdateSubmission(ctx context.Context, id int, upd kilonova.SubmissionUpdate) error
- func (s *DB) UpdateSubmissionSubtaskPercentage(ctx context.Context, id int, percentage decimal.Decimal) (err error)
- func (s *DB) UpdateTagName(ctx context.Context, id int, newName string) error
- func (s *DB) UpdateTagType(ctx context.Context, id int, newType kilonova.TagType) error
- func (s *DB) UpdateTest(ctx context.Context, id int, upd kilonova.TestUpdate) error
- func (s *DB) UpdateUser(ctx context.Context, id int, upd kilonova.UserFullUpdate) error
- func (s *DB) UpdateUserPasswordHash(ctx context.Context, userID int, hash string) error
- func (s *DB) User(ctx context.Context, filter kilonova.UserFilter) (*User, error)
- func (s *DB) UserExists(ctx context.Context, username string, email string) (bool, error)
- func (s *DB) UsernameChangeHistory(ctx context.Context, userID int) ([]*kilonova.UsernameChange, error)
- func (s *DB) Users(ctx context.Context, filter kilonova.UserFilter) ([]*User, error)
- func (s *DB) VisibleContests(ctx context.Context, userID int) ([]*kilonova.Contest, error)
- func (s *DB) VisibleFutureContests(ctx context.Context, userID int) ([]*kilonova.Contest, error)
- func (s *DB) VisibleProblem(ctx context.Context, id int, user *kilonova.UserBrief) (*kilonova.Problem, error)
- func (s *DB) VisibleRunningContests(ctx context.Context, userID int) ([]*kilonova.Contest, error)
- func (s *DB) WaitingSubmissionCount(ctx context.Context, userID int) (int, error)
- type ProblemStats
- type ProblemTag
- type QuestionFilter
- type User
Constants ¶
This section is empty.
Variables ¶
var (
LogQueries = config.GenFlag[bool]("behavior.log_sql", false, "Log SQL Requests (for debugging purposes)")
)
Functions ¶
func FormatLimitOffset ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) AddContestEditor ¶
func (*DB) AddContestTester ¶
func (*DB) AddDonation ¶
func (*DB) AddProblemEditor ¶
func (*DB) AddProblemViewer ¶
func (*DB) AnswerContestQuestion ¶
func (*DB) Attachment ¶
func (a *DB) Attachment(ctx context.Context, filter *kilonova.AttachmentFilter) (*kilonova.Attachment, error)
func (*DB) AttachmentData ¶
func (*DB) Attachments ¶
func (a *DB) Attachments(ctx context.Context, filter *kilonova.AttachmentFilter) ([]*kilonova.Attachment, error)
TODO: Remove problem_attachments and blog_post_attachments views from DB
func (*DB) BulkUpdateProblems ¶
func (s *DB) BulkUpdateProblems(ctx context.Context, filter kilonova.ProblemFilter, upd kilonova.ProblemUpdate) error
func (*DB) BulkUpdateSubmissions ¶
func (s *DB) BulkUpdateSubmissions(ctx context.Context, filter kilonova.SubmissionFilter, upd kilonova.SubmissionUpdate) error
func (*DB) ChildrenProblemListsByPblistID ¶
func (*DB) ClearUserContestSubmissions ¶
func (*DB) ContestAnnouncement ¶
func (*DB) ContestAnnouncements ¶
func (*DB) ContestClassicLeaderboard ¶
func (*DB) ContestICPCLeaderboard ¶
func (*DB) ContestMaxScore ¶
func (*DB) ContestProblems ¶
func (*DB) ContestQuestion ¶
func (*DB) ContestQuestions ¶
func (s *DB) ContestQuestions(ctx context.Context, filter QuestionFilter) ([]*kilonova.ContestQuestion, error)
func (*DB) ContestRegistration ¶
func (*DB) ContestRegistrationCount ¶
func (*DB) ContestRegistrations ¶
func (*DB) CountBlogPosts ¶
func (*DB) CountProblems ¶
func (*DB) CountUsers ¶
CountUsers retrieves the number of users matching a filter. It ignores the limit fields in `filter`.
func (*DB) CreateAuditLog ¶
func (*DB) CreateBlogPost ¶
func (*DB) CreateBlogPostAttachment ¶
func (*DB) CreateContest ¶
func (*DB) CreateContestAnnouncement ¶
func (*DB) CreateContestQuestion ¶
func (*DB) CreatePaste ¶
func (*DB) CreateProblem ¶
func (*DB) CreateProblemAttachment ¶
func (*DB) CreateProblemList ¶
func (*DB) CreatePwdResetRequest ¶
func (*DB) CreateSubTask ¶
func (*DB) CreateSubmission ¶
func (*DB) CreateUser ¶
func (s *DB) CreateUser(ctx context.Context, name, passwordHash, email, preferredLanguage string, theme kilonova.PreferredTheme, displayName string, generated bool) (int, error)
CreateUser creates a new user with the specified data.
func (*DB) CreateVerification ¶
func (*DB) DeleteAttachments ¶
func (*DB) DeleteContestAnnouncement ¶
func (*DB) DeleteContestRegistration ¶
func (*DB) DeleteProblemTests ¶
func (*DB) DeleteUser ¶
DeleteUser permanently deletes a user from the system.
func (*DB) ExtendSession ¶
func (*DB) GetPwdResetRequest ¶
func (*DB) GetVerification ¶
func (*DB) InsertContestRegistration ¶
func (*DB) IsContestViewer ¶
func (*DB) IsFullProblemViewer ¶
func (*DB) IsPostViewer ¶
func (*DB) IsProblemEditor ¶
func (*DB) IsProblemViewer ¶
func (*DB) LastUsernameChange ¶
func (*DB) ManyProblemsTags ¶
func (*DB) MaxScoreSubID ¶
func (*DB) MaximumScoreSubTaskTests ¶
func (*DB) MaximumScoreSubTasks ¶
func (s *DB) MaximumScoreSubTasks(ctx context.Context, problemID int, userID int, contestID *int) ([]*kilonova.SubmissionSubTask, error)
Note that they will probably not be from the same submission!
func (*DB) MergeTags ¶
original - the OG that will remain after the merge toReplace - the one that will be replaced
func (*DB) NameUsedBefore ¶
func (*DB) NumBulkedSolvedPblistProblems ¶
func (*DB) NumSolvedPblistProblems ¶
func (*DB) ParentProblemListsByPblistID ¶
func (*DB) ProblemChecklist ¶
func (*DB) ProblemEditors ¶
func (*DB) ProblemList ¶
func (*DB) ProblemListByName ¶
func (*DB) ProblemLists ¶
func (s *DB) ProblemLists(ctx context.Context, filter kilonova.ProblemListFilter) ([]*kilonova.ProblemList, error)
func (*DB) ProblemListsByProblemID ¶
func (*DB) ProblemStatisticsMemory ¶
func (*DB) ProblemStatisticsSize ¶
func (*DB) ProblemStatisticsTime ¶
func (*DB) ProblemTags ¶
func (*DB) ProblemViewers ¶
func (*DB) ProblemsStatistics ¶
func (*DB) RefreshHotProblems ¶
func (*DB) RelevantTags ¶
RelevantTags returns tags that are most commonly found in problems containing that tag
func (*DB) RemainingSubmissionCount ¶
func (*DB) RemovePwdResetRequest ¶
func (*DB) RemoveVerification ¶
func (*DB) ResetProblemSubmissions ¶
func (*DB) RunningContestsByProblem ¶
func (s *DB) RunningContestsByProblem(ctx context.Context, problemID int) ([]*kilonova.Contest, error)
TODO: Test
func (*DB) ScoredContestProblems ¶
func (*DB) ScoredProblem ¶
func (*DB) ScoredProblems ¶
func (s *DB) ScoredProblems(ctx context.Context, filter kilonova.ProblemFilter, userID int) ([]*kilonova.ScoredProblem, error)
func (*DB) StartContestRegistration ¶
func (*DB) StripContestAccess ¶
func (*DB) StripProblemAccess ¶
func (*DB) SubTaskByID ¶
func (*DB) SubTasksByTest ¶
func (*DB) SubTestsBySubID ¶
func (*DB) Submission ¶
func (*DB) SubmissionCount ¶
func (*DB) SubmissionLookingUser ¶
func (*DB) SubmissionPaste ¶
func (*DB) SubmissionSubTasksBySubID ¶
func (*DB) Submissions ¶
func (s *DB) Submissions(ctx context.Context, filter kilonova.SubmissionFilter) ([]*kilonova.Submission, error)
func (*DB) TagByLooseName ¶
func (*DB) TagsByType ¶
func (*DB) UpdateAttachment ¶
func (*DB) UpdateAttachmentData ¶
func (*DB) UpdateBlogPost ¶
func (*DB) UpdateContest ¶
func (*DB) UpdateContestAnnouncement ¶
func (*DB) UpdateContestProblems ¶
func (*DB) UpdateProblem ¶
func (*DB) UpdateProblemList ¶
func (*DB) UpdateProblemListProblems ¶
func (*DB) UpdateProblemListSublists ¶
func (*DB) UpdateProblemTags ¶
func (*DB) UpdateSubTask ¶
func (*DB) UpdateSubTaskTests ¶
func (*DB) UpdateSubTest ¶
func (*DB) UpdateSubmission ¶
func (*DB) UpdateSubmissionSubtaskPercentage ¶
func (*DB) UpdateTagName ¶
func (*DB) UpdateTagType ¶
func (*DB) UpdateTest ¶
func (*DB) UpdateUser ¶
UpdateUser updates a user. Returns ENOTFOUND if the user does not exist
func (*DB) UpdateUserPasswordHash ¶
func (*DB) UserExists ¶
UserExists says wether or not a user matches either a specific username (case-insensitive), either a specific email address.
func (*DB) UsernameChangeHistory ¶
func (*DB) VisibleContests ¶
func (*DB) VisibleFutureContests ¶
func (*DB) VisibleProblem ¶
func (*DB) VisibleRunningContests ¶
type ProblemStats ¶
type ProblemTag ¶
type QuestionFilter ¶
type User ¶
type User struct { ID int `json:"id"` CreatedAt time.Time `json:"created_at" db:"created_at"` Name string `json:"name"` Admin bool `json:"admin"` Proposer bool `json:"proposer"` Email string `json:"email"` Password string `json:"-"` Bio string `json:"bio"` VerifiedEmail bool `json:"verified_email" db:"verified_email"` EmailVerifSentAt *time.Time `json:"-" db:"email_verif_sent_at"` PreferredLanguage string `json:"-" db:"preferred_language"` PreferredTheme kilonova.PreferredTheme `json:"-" db:"preferred_theme"` NameChangeRequired bool `json:"name_change_required" db:"name_change_required"` LockedLogin bool `json:"locked_login" db:"locked_login"` Generated bool `json:"generated" db:"generated"` DisplayName string `json:"display_name" db:"display_name"` }
Source Files ¶
- access.go
- attachment.go
- audit_log.go
- blogpost.go
- contest.go
- contest_qna.go
- contest_registrations.go
- db.go
- donations.go
- forgot_pwd.go
- many2many.go
- pblist.go
- problem.go
- problem_statistics.go
- querybuilder.go
- sub_paste.go
- sub_reset.go
- sub_subtask.go
- submission.go
- subtask.go
- subtest.go
- tags.go
- test.go
- user.go
- verif_session.go
- views.go