Documentation
¶
Index ¶
- func AddToQueue(db *db.DB, q *Queue) error
- func DeleteFromQueue(db *db.DB, id int) error
- func GetMaxScore(db *db.DB, dpid int, tid int) (float64, error)
- func ReadSubsCode(db *db.DB, rid int) (string, error)
- func Resolve1(db *db.DB, drid int) error
- func ResolveQueue(db *db.DB) error
- func UpdateDebugSubmission(db *db.DB, id int, result string, score float64) error
- func WriteDebugProblem(db *db.DB, prob *DebugProblem) (int64, error)
- func WriteDebugSubmission(db *db.DB, sub *DebugSubmission) (int64, error)
- type DebugProblem
- type DebugSubmission
- type JSONDebugProblem
- type JSONDebugSubmission
- type JSONProblem
- type JSONVerify
- type JSONVerifyUser
- type Judge
- type Problem
- type Queue
- type Run
- type Test
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveQueue ¶
func UpdateDebugSubmission ¶
func WriteDebugProblem ¶
func WriteDebugProblem(db *db.DB, prob *DebugProblem) (int64, error)
func WriteDebugSubmission ¶
func WriteDebugSubmission(db *db.DB, sub *DebugSubmission) (int64, error)
Types ¶
type DebugProblem ¶
type DebugProblem struct {
Dpid int
Code string
Name string
Status string
Solved int
Total int
Rid int
Pid int
Language string
Score float64
Result string
MinDiff int
}
func ReadDebugProblemWithCode ¶
func ReadDebugProblemWithCode(db *db.DB, code string) (*DebugProblem, error)
func ReadDebugProblemWithID ¶
func ReadDebugProblemWithID(db *db.DB, dpid int) (*DebugProblem, error)
type DebugSubmission ¶
type DebugSubmission struct {
Drid int
Dpid int
Rid int
Tid int
Language string
Submittime int64
Result string
Score float64
Diff int
Code string
}
func ReadDebugSubmission ¶
func ReadDebugSubmission(db *db.DB, id int) (*DebugSubmission, error)
type JSONDebugProblem ¶
type JSONDebugProblem struct {
Problem *JSONProblem `json:"problem"`
Language string `json:"language"`
Result string `json:"result"`
MaxScore float64 `json:"best_score"`
Code string `json:"code"`
Judge *Judge `json:"judge"`
}
type JSONDebugSubmission ¶
type JSONDebugSubmission struct {
Dpcode string `json:"debug_problem_code"`
Rid int `json:"codefun_id"`
Score float64 `json:"edit_result"`
Diff int `json:"edit_score"`
CFResult string `json:"result"`
CFScore float64 `json:"score"`
}
func ReadJSONDebugSubmission ¶
func ReadJSONDebugSubmission(db *db.DB, id int) (*JSONDebugSubmission, error)
type JSONProblem ¶
func ReadJSONProblemWithID ¶
func ReadJSONProblemWithID(db *db.DB, id int) (*JSONProblem, error)
type JSONVerify ¶
type JSONVerify struct {
Data *JSONVerifyUser `json:"data"`
Valid bool
}
func Verify ¶
func Verify(bearer_token string) (*JSONVerify, error)
type JSONVerifyUser ¶
type JSONVerifyUser struct {
Tid int `json:"id"`
}
type Judge ¶
type Judge struct {
Correct int `json:"correct"`
Total int `json:"total"`
Tests []Test `json:"tests"`
}
func ConvertToJudge ¶
type Problem ¶
Click to show internal directories.
Click to hide internal directories.