Documentation ¶
Index ¶
- Constants
- func AddCatalog(c *gin.Context, newCatalog *model.Catalog) error
- func AddContest(c *gin.Context, newContest *model.Contest) error
- func AddGroup(c *gin.Context, newGroup *model.Group) error
- func AddProblem(c *gin.Context, newProblem *model.Problem) error
- func AddTag(c *gin.Context, newTag *model.Tag) error
- func CheckPermission(c *gin.Context, groups []int, anyOne bool) error
- func Comment4Problem(c *gin.Context, commentArg *data.CommentArg) (*model.Comment, error)
- func DeleteCatalog(c *gin.Context, id int) error
- func DeleteTag(c *gin.Context, id int) error
- func GetAllCatalogs(c *gin.Context, page, pageSize int, order string) ([]model.Catalog, error)
- func GetAllContests(c *gin.Context, page, pageSize int, order string) ([]model.Contest, error)
- func GetAllGroups(c *gin.Context, page, pageSize int, order string) ([]model.Group, error)
- func GetAllProblems(c *gin.Context, page, pageSize int, order string, of string, id int) ([]model.Problem, error)
- func GetAllProblemsOf(c *gin.Context) *gorm.DB
- func GetAllProblemsOfContest(c *gin.Context, id int) (*gorm.DB, error)
- func GetAllProblemsOfGroup(c *gin.Context, id int) (*gorm.DB, error)
- func GetAllProblemsOfTag(c *gin.Context, id int) *gorm.DB
- func GetAllSubmit(c *gin.Context, page, pageSize int, order string, of string, id int, ...) ([]model.Submit, error)
- func GetAllSubmitOfContest(c *gin.Context, id int, onlyDuringContest bool) (*gorm.DB, error)
- func GetAllSubmitOfGroup(c *gin.Context, id int) (*gorm.DB, error)
- func GetAllSubmitOfMe(c *gin.Context) (*gorm.DB, error)
- func GetAllSubmitOfProblem(c *gin.Context, id int) (*gorm.DB, error)
- func GetAllSubmitOfUser(c *gin.Context, id int) (*gorm.DB, error)
- func GetAllTags(c *gin.Context) ([]model.Tag, error)
- func GetAllTemplates(c *gin.Context) ([]model.Template, error)
- func GetCatalog(c *gin.Context, id int) (*model.Catalog, error)
- func GetContest(c *gin.Context, id int) (*model.Contest, error)
- func GetContestInviteData(c *gin.Context, inviteId string) (*data.ContestInviteData, error)
- func GetContestInviteInfo(c *gin.Context, contestID int) (*data.ContestInviteData, error)
- func GetGroup(c *gin.Context, id int) (*model.Group, error)
- func GetGroupInviteData(c *gin.Context, inviteId string) (*data.GroupInviteData, error)
- func GetGroupInviteInfo(c *gin.Context, groupID int) (*data.GroupInviteData, error)
- func GetLastSubmit(c *gin.Context, id int, needSuccess bool, needComplete bool) (*model.Submit, error)
- func GetProblem(c *gin.Context, id int, forUpdate bool) (*model.Problem, error)
- func GetResult(c *gin.Context, problemID int) (*judge.OuterResult, error)
- func GetSubmit(c *gin.Context, id int) (*model.Submit, error)
- func GetTag(c *gin.Context, id int) (*model.Tag, error)
- func Invite2Contest(c *gin.Context, inviteData *data.ContestInviteData) (err error)
- func Invite2Group(c *gin.Context, inviteData *data.GroupInviteData) (err error)
- func JoinContest(c *gin.Context, inviteId string, password string) (err error)
- func JoinContestQuery(c *gin.Context, inviteId string) (*data.ContestWrap, error)
- func JoinGroup(c *gin.Context, inviteId string, password string) (err error)
- func JoinGroupQuery(c *gin.Context, inviteId string) (*data.GroupWrap, error)
- func SaveTheme(c *gin.Context, theme *model.Theme) error
- func Submit(c *gin.Context, submitArg *data.SubmitArg) error
- func UpdateCatalog(c *gin.Context, newCatalog *model.Catalog) error
- func UpdateContest(c *gin.Context, newContest *model.Contest) error
- func UpdateGroup(c *gin.Context, newGroup *model.Group) error
- func UpdateProblem(c *gin.Context, newProblem *model.Problem) error
- func UpdateTag(c *gin.Context, newTag *model.Tag) error
- func VoteProblem(c *gin.Context, id int, attitude int) error
Constants ¶
View Source
const (
ContestInvitePrefix = "contest_invite_"
)
View Source
const (
GroupInvitePrefix = "group_invite_"
)
Variables ¶
This section is empty.
Functions ¶
func CheckPermission ¶
check if user have these group Permission
func Comment4Problem ¶
func GetAllCatalogs ¶
func GetAllContests ¶
func GetAllGroups ¶
func GetAllProblems ¶
func GetAllProblemsOfContest ¶
func GetAllSubmit ¶
func GetAllSubmitOfContest ¶
func GetContestInviteData ¶
func GetContestInviteInfo ¶
func GetGroupInviteData ¶
return value:
func GetGroupInviteInfo ¶
func GetLastSubmit ¶
func GetLastSubmit(c *gin.Context, id int, needSuccess bool, needComplete bool) (*model.Submit, error)
get last submit, is set success flag, return lease successful submit
func Invite2Contest ¶
func Invite2Contest(c *gin.Context, inviteData *data.ContestInviteData) (err error)
func Invite2Group ¶
func Invite2Group(c *gin.Context, inviteData *data.GroupInviteData) (err error)
func JoinContestQuery ¶
query before join
func JoinGroupQuery ¶
query before join
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.