Documentation ¶
Index ¶
- Variables
- func CheckCollege(college string) bool
- func CheckEmail(email string) bool
- func CheckName(name string) bool
- func CheckPassword(password string) bool
- func CheckUserName(username string) bool
- func Exec(pid int, rawCode string, lang string, stdin string) Bridge.Code
- func ExecBatch(pid int, rawcode string, lang string) []Bridge.TestCaseStatus
- type Contest
- type Contestlogs
- type Problem
- func (problem *Problem) Create() (int, bool)
- func (problem *Problem) DeleteByPid() bool
- func (problem *Problem) GetById() bool
- func (problem *Problem) GetByPid() bool
- func (problem *Problem) GetByStatement() bool
- func (problem *Problem) GetByType(page int) ([]Problem, int64)
- func (problem *Problem) GetByUid() ([]Problem, int64)
- func (problem *Problem) GetRecent() ([]Problem, int64)
- func (problem *Problem) GetSampleIOByPid() bool
- func (problem *Problem) GetTypes() (*orm.ParamsList, int64)
- func (problem *Problem) Update() bool
- type Problemlogs
- type SubmitResponse
- type Testcases
- type User
- func (user *User) AddScore(score int) bool
- func (user *User) ChangePassword(password string) bool
- func (user *User) Create() (int, bool)
- func (user *User) Delete() bool
- func (user *User) Get() bool
- func (user *User) GetByUsername() bool
- func (user *User) GetEditors() []User
- func (user *User) GetUserInfo() bool
- func (user *User) IsEditor() bool
- func (user *User) IsEmailUnique() bool
- func (user *User) IsUsernameUnique() bool
- func (user *User) Login() bool
- func (user *User) LoginVerify() error
- func (user *User) MakeEditor() bool
- func (user *User) RevokeEditor() bool
- func (user *User) SearchByName() ([]User, int64)
- func (user *User) SignupVerify() error
- func (user *User) UpdateCollege(college string) bool
- func (user *User) UpdateRank(rank int) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var (
UsernameError error
)
Functions ¶
func CheckCollege ¶
func CheckEmail ¶
func CheckPassword ¶
func CheckUserName ¶
Types ¶
type Contest ¶
type Contestlogs ¶
type Contestlogs struct { Id int `orm:"pk"` Uid int Cid int Points int Time time.Time `orm:"auto_now_add;type(datetime)"` }
func (*Contestlogs) Add ¶
func (score *Contestlogs) Add() bool
func (*Contestlogs) GetByCid ¶
func (score *Contestlogs) GetByCid() (*[]Contestlogs, bool)
func (*Contestlogs) GetByUidCid ¶
func (score *Contestlogs) GetByUidCid() bool
func (*Contestlogs) Update ¶
func (score *Contestlogs) Update() bool
type Problem ¶
type Problem struct { Pid int `orm:"pk"` Uid int Statement string Description string Constraints string Sample_input string Sample_output string Solution_description string `json:"-"` Solution_code string `json:"-"` Type string Difficulty string Created_at time.Time `orm:"auto_now_add;type(datetime)"` Points int Solve_count int }
func (*Problem) DeleteByPid ¶
func (*Problem) GetByStatement ¶
func (*Problem) GetSampleIOByPid ¶
type Problemlogs ¶
type Problemlogs struct { Id int `orm:"pk"` Pid int Uid int Solved int Points int Time time.Time `orm:"auto_now_add;type(datetime)"` }
func (*Problemlogs) CommitByPidUid ¶
func (log *Problemlogs) CommitByPidUid() bool
func (*Problemlogs) GetByPidUid ¶
func (log *Problemlogs) GetByPidUid() bool
func (*Problemlogs) GetByUid ¶
func (log *Problemlogs) GetByUid() ([]Problemlogs, int64)
func (*Problemlogs) GetRecentByPid ¶
func (log *Problemlogs) GetRecentByPid() ([]Problemlogs, int64)
func (*Problemlogs) Update ¶
func (log *Problemlogs) Update() bool
type SubmitResponse ¶
type SubmitResponse struct { Score int Status []Bridge.TestCaseStatus }
func SubmitUpdateScore ¶
func SubmitUpdateScore(uid int, pid int, rawcode string, lang string) SubmitResponse
type Testcases ¶
func (*Testcases) DeleteAllByPid ¶
func (*Testcases) DeleteOneByPidTid ¶
func (*Testcases) GetAllByPid ¶
func (*Testcases) GetOneByPidTid ¶
type User ¶
type User struct { Uid int `orm:"pk"` Username string Password string `json:"-"` Name string College string Email string Score int Rank int Is_editor int `json:"-"` }
func (*User) ChangePassword ¶
func (*User) GetByUsername ¶
func (*User) GetEditors ¶
func (*User) GetUserInfo ¶
func (*User) IsEmailUnique ¶
func (*User) IsUsernameUnique ¶
func (*User) LoginVerify ¶
func (*User) MakeEditor ¶
func (*User) RevokeEditor ¶
func (*User) SearchByName ¶
func (*User) SignupVerify ¶
func (*User) UpdateCollege ¶
func (*User) UpdateRank ¶
Click to show internal directories.
Click to hide internal directories.