Documentation ¶
Index ¶
- Constants
- Variables
- func IsNil(i interface{}) bool
- func PageCal(totalNum int64, pageNo int32, pageSize int) (bool, int32, int32)
- func PageRangeCal(totalNum int64, pageNo int32, pageSize int) (bool, []int, int32, int32)
- type BaseController
- func (this *BaseController) Abort401(err error)
- func (this *BaseController) Abort404(err error)
- func (this *BaseController) Abort500(err error)
- func (this *BaseController) FilterSource(key, msg string) (string, int)
- func (this *BaseController) GetMushString(key, msg string) string
- func (this *BaseController) GetRegUserString(key, msg string) string
- func (this *BaseController) JsonErr(msg string, code int32, action string)
- func (this *BaseController) JsonOK(msg, action string)
- func (this *BaseController) JsonOKH(msg string, data MAP_H)
- func (this *BaseController) MustLogin()
- func (this *BaseController) Prepare()
- type BlogController
- type CPProblem
- type CR
- type CeinfoController
- type ContestController
- func (this *ContestController) ContestAddGet()
- func (this *ContestController) ContestAddPost()
- func (this *ContestController) ContestCid()
- func (this *ContestController) ContestList()
- func (this *ContestController) ContestListPage()
- func (this *ContestController) ContestPage()
- func (this *ContestController) ContestRank()
- func (this *ContestController) ContestStatus()
- func (this *ContestController) ContestStatusPage()
- func (this *ContestController) ContestUpdatePost()
- func (this *ContestController) ContestUpdateStatus()
- type ContestProblem
- type ContestRank
- type ContestSolution
- type ErrorController
- type IndexController
- func (this *IndexController) ContestUpdate()
- func (this *IndexController) Index()
- func (this *IndexController) IndexAdmin()
- func (this *IndexController) IndexContest()
- func (this *IndexController) IndexFaqs()
- func (this *IndexController) IndexProblemset()
- func (this *IndexController) IndexReg()
- func (this *IndexController) IndexStatus()
- func (this *IndexController) IndexUser()
- func (this *IndexController) Indexs()
- type MAP_H
- type Pro
- type ProUser
- type ProblemController
- func (this *ProblemController) DownloadTestData()
- func (this *ProblemController) ExInport()
- func (this *ProblemController) Export()
- func (this *ProblemController) Fileupload()
- func (this *ProblemController) Inport()
- func (this *ProblemController) Problem()
- func (this *ProblemController) ProblemAdd()
- func (this *ProblemController) ProblemAddPost()
- func (this *ProblemController) ProblemContest()
- func (this *ProblemController) ProblemDel()
- func (this *ProblemController) ProblemEdit()
- func (this *ProblemController) ProblemList()
- func (this *ProblemController) ProblemListPage()
- func (this *ProblemController) ProblemSetPage()
- func (this *ProblemController) ProblemTestDataEdit()
- func (this *ProblemController) ProblemUpdate()
- func (this *ProblemController) ProblemUpdateStatus()
- func (this *ProblemController) Rejudge()
- func (this *ProblemController) RejudgePost()
- func (this *ProblemController) Upload()
- type Problems
- type RankUsers
- type SolutionController
- type SortUser
- type UserController
- func (this *UserController) ChangePassword()
- func (this *UserController) ChangePwd()
- func (this *UserController) Login()
- func (this *UserController) Logout()
- func (this *UserController) PermissionsAdd()
- func (this *UserController) PermissionsAddPost()
- func (this *UserController) PermissionsList()
- func (this *UserController) Profile()
- func (this *UserController) Profile2()
- func (this *UserController) SendEmailForgot()
- func (this *UserController) UserForgotPwd()
- func (this *UserController) UserGen()
- func (this *UserController) UserGenPost()
- func (this *UserController) UserList()
- func (this *UserController) UserListPage()
- func (this *UserController) UserReg()
- func (this *UserController) UserUpdateGet()
- func (this *UserController) UserUpdatePost()
Constants ¶
const DOWN_DIR = "./static/down/"
const SESSION_USER_KEY = "JOE"
Variables ¶
var CPT = captcha.NewWithFilter("/captcha/", store)
var OJ_DATA = "/home/judge/data"
var OJ_ZIP_TEMP_DATA = OJ_DATA + "/tempzip"
var USERROLE = []int{0, 1, 2}
Functions ¶
Types ¶
type BaseController ¶
type BaseController struct { beego.Controller User models.Users IsLogin bool IsAdmin bool IsTeacher bool AvatarURL string }
func (*BaseController) Abort401 ¶
func (this *BaseController) Abort401(err error)
func (*BaseController) Abort404 ¶
func (this *BaseController) Abort404(err error)
func (*BaseController) Abort500 ¶
func (this *BaseController) Abort500(err error)
func (*BaseController) FilterSource ¶
func (this *BaseController) FilterSource(key, msg string) (string, int)
* 过滤代码
func (*BaseController) GetMushString ¶
func (this *BaseController) GetMushString(key, msg string) string
func (*BaseController) GetRegUserString ¶
func (this *BaseController) GetRegUserString(key, msg string) string
func (*BaseController) JsonErr ¶
func (this *BaseController) JsonErr(msg string, code int32, action string)
func (*BaseController) JsonOK ¶
func (this *BaseController) JsonOK(msg, action string)
func (*BaseController) JsonOKH ¶
func (this *BaseController) JsonOKH(msg string, data MAP_H)
func (*BaseController) MustLogin ¶
func (this *BaseController) MustLogin()
func (*BaseController) Prepare ¶
func (this *BaseController) Prepare()
type BlogController ¶
type BlogController struct {
BaseController
}
func (*BlogController) BlogAddGet ¶
func (this *BlogController) BlogAddGet()
@router /admin/art/add [get]
func (*BlogController) BlogAddPost ¶
func (this *BlogController) BlogAddPost()
@router /admin/art/add [post]
func (*BlogController) BlogIndex ¶
func (this *BlogController) BlogIndex()
@router /article/:artid [get]
func (*BlogController) BlogList ¶
func (this *BlogController) BlogList()
@router /admin/art/list [get]
type CR ¶
type CR []*ContestRank
type CeinfoController ¶
type CeinfoController struct {
BaseController
}
func (*CeinfoController) CeinfoContest ¶
func (this *CeinfoController) CeinfoContest()
@router /contest/ceinfo/:sid [get]
type ContestController ¶
type ContestController struct { BaseController Visible bool }
func (*ContestController) ContestAddGet ¶
func (this *ContestController) ContestAddGet()
@router /contest/add [get]
func (*ContestController) ContestAddPost ¶
func (this *ContestController) ContestAddPost()
@router /contest/add [post]
func (*ContestController) ContestCid ¶
func (this *ContestController) ContestCid()
@router /contest/cid/:id [get]
func (*ContestController) ContestList ¶
func (this *ContestController) ContestList()
@router /contest/list [get]
func (*ContestController) ContestListPage ¶
func (this *ContestController) ContestListPage()
@router /contest/list/:page [get]
func (*ContestController) ContestPage ¶
func (this *ContestController) ContestPage()
@router /contest/:page [get]
func (*ContestController) ContestRank ¶
func (this *ContestController) ContestRank()
@router /contestrank/cid/:cid [get]
func (*ContestController) ContestStatus ¶
func (this *ContestController) ContestStatus()
@router /contest/status/cid/:cid [get]
func (*ContestController) ContestStatusPage ¶
func (this *ContestController) ContestStatusPage()
@router /contest/status/cid/:cid/:page [get]
func (*ContestController) ContestUpdatePost ¶
func (this *ContestController) ContestUpdatePost()
@router /contest/update [post]
func (*ContestController) ContestUpdateStatus ¶
func (this *ContestController) ContestUpdateStatus()
@router /contest/updatestatus [post]
type ContestProblem ¶
type ContestRank ¶
type ContestSolution ¶
type ErrorController ¶
type ErrorController struct {
beego.Controller
}
func (*ErrorController) Error401 ¶
func (c *ErrorController) Error401()
func (*ErrorController) Error404 ¶
func (c *ErrorController) Error404()
func (*ErrorController) Error500 ¶
func (c *ErrorController) Error500()
func (*ErrorController) ErrorDb ¶
func (c *ErrorController) ErrorDb()
type IndexController ¶
type IndexController struct {
BaseController
}
func (*IndexController) ContestUpdate ¶
func (this *IndexController) ContestUpdate()
@router /contest/update/:cid [get]
func (*IndexController) IndexContest ¶
func (this *IndexController) IndexContest()
@router /contest [get]
func (*IndexController) IndexProblemset ¶
func (this *IndexController) IndexProblemset()
@router /problemset [get]
func (*IndexController) IndexStatus ¶
func (this *IndexController) IndexStatus()
@router /status [get]
type ProblemController ¶
type ProblemController struct {
BaseController
}
func (*ProblemController) DownloadTestData ¶
func (this *ProblemController) DownloadTestData()
@router /download/testdata [post]
func (*ProblemController) ExInport ¶
func (this *ProblemController) ExInport()
@router /problem/exinport [get]
func (*ProblemController) Export ¶
func (this *ProblemController) Export()
@router /problem/export [post]
func (*ProblemController) Fileupload ¶
func (this *ProblemController) Fileupload()
@router /problem/fileupload [post]
func (*ProblemController) Inport ¶
func (this *ProblemController) Inport()
@router /problem/inport [post]
func (*ProblemController) Problem ¶
func (this *ProblemController) Problem()
@router /problem/:id [get]
func (*ProblemController) ProblemAdd ¶
func (this *ProblemController) ProblemAdd()
@router /problem/add [get]
func (*ProblemController) ProblemAddPost ¶
func (this *ProblemController) ProblemAddPost()
@router /problem/add [post]
func (*ProblemController) ProblemContest ¶
func (this *ProblemController) ProblemContest()
@router /contest/problem/:id/:cid [get]
func (*ProblemController) ProblemDel ¶
func (this *ProblemController) ProblemDel()
@router /problem/del [post]
func (*ProblemController) ProblemEdit ¶
func (this *ProblemController) ProblemEdit()
@router /problem/edit/:id [get]
func (*ProblemController) ProblemList ¶
func (this *ProblemController) ProblemList()
@router /problem/list [get]
func (*ProblemController) ProblemListPage ¶
func (this *ProblemController) ProblemListPage()
@router /problem/list/:page [get]
func (*ProblemController) ProblemSetPage ¶
func (this *ProblemController) ProblemSetPage()
@router /problemset/:page [get]
func (*ProblemController) ProblemTestDataEdit ¶
func (this *ProblemController) ProblemTestDataEdit()
@router /problem/editdata/:pid [get]
func (*ProblemController) ProblemUpdate ¶
func (this *ProblemController) ProblemUpdate()
@router /problem/update [post]
func (*ProblemController) ProblemUpdateStatus ¶
func (this *ProblemController) ProblemUpdateStatus()
@router /problem/updatestatus [post]
func (*ProblemController) Rejudge ¶
func (this *ProblemController) Rejudge()
@router /admin/rejudge [get]
func (*ProblemController) RejudgePost ¶
func (this *ProblemController) RejudgePost()
@router /admin/rejudge [post]
func (*ProblemController) Upload ¶
func (this *ProblemController) Upload()
@router /upload/fileupload/:pid [post]
type SolutionController ¶
type SolutionController struct {
BaseController
}
func (*SolutionController) StatusPage ¶
func (this *SolutionController) StatusPage()
@router /status/:page [get]
type UserController ¶
type UserController struct {
BaseController
}
func (*UserController) ChangePassword ¶
func (this *UserController) ChangePassword()
@router /admin/changepwd [get]
func (*UserController) ChangePwd ¶
func (this *UserController) ChangePwd()
@router /admin/changepwd [post]
func (*UserController) PermissionsAdd ¶
func (this *UserController) PermissionsAdd()
@router /admin/permissions/add [get]
func (*UserController) PermissionsAddPost ¶
func (this *UserController) PermissionsAddPost()
@router /admin/permissions/add [post]
func (*UserController) PermissionsList ¶
func (this *UserController) PermissionsList()
@router /admin/permissions/list [get]
func (*UserController) Profile2 ¶
func (this *UserController) Profile2()
@router /profile/:uid [get]
func (*UserController) SendEmailForgot ¶
func (this *UserController) SendEmailForgot()
@router /forgotpwd/sendemail [post]
func (*UserController) UserForgotPwd ¶
func (this *UserController) UserForgotPwd()
@router /forgotpwd [get]
func (*UserController) UserGen ¶
func (this *UserController) UserGen()
@router /admin/user/generate [get]
func (*UserController) UserGenPost ¶
func (this *UserController) UserGenPost()
@router /admin/user/generate [post]
func (*UserController) UserListPage ¶
func (this *UserController) UserListPage()
@router /user/list/:page [get]
func (*UserController) UserUpdateGet ¶
func (this *UserController) UserUpdateGet()
@router /profile/update [get]
func (*UserController) UserUpdatePost ¶
func (this *UserController) UserUpdatePost()
@router /profile/update [post]