Documentation
¶
Index ¶
- Constants
- type AcquireTaskResponse
- type EvaluateRequest
- type EvaluateResponse
- type ExportResponse
- type InsertProgramRequest
- type InsertProgramResponse
- type InsertTaskRequest
- type InsertTaskResponse
- type RunAcquireResponse
- type RunAddRequest
- type RunAddResponse
- type RunEvaluateRequest
- type RunEvaluateResponse
- type RunExtendRequest
- type RunFlushRequest
- type SubmitRequest
- type SubmitResponse
- type UpdateTaskRequest
- type UpdateTaskResponse
Constants ¶
View Source
const PATH_PREFIX = "scvzcaae"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcquireTaskResponse ¶
type AcquireTaskResponse struct { TaskID int `json:"task_id",db:"task_id"` ProgramID int64 `json:"program_id",db:"program_id"` ProgramName string `json:"program_name",db:"program_name"` ProgramCode string `json:"program_code",db:"program_code"` }
func AcquireTask ¶
func AcquireTask() (*AcquireTaskResponse, error)
type EvaluateRequest ¶
type EvaluateResponse ¶
type EvaluateResponse struct { ProblemID int `json:"problem_id"` Cost int64 `json:"cost"` Similarity int64 `json:"similarity"` Image string `json:"image"` }
func Evaluate ¶
func Evaluate(req *EvaluateRequest) (*EvaluateResponse, error)
type ExportResponse ¶
type ExportResponse struct { RunID int `json:"id" db:"run_id"` ProblemID int `json:"problem_id" db:"problem_id"` RunCreated string `json:"submitted_at" db:"run_created"` RunScore *int64 `json:"cost" db:"run_score"` ISL string `json:"-" db:"solution_isl"` }
func ExportRun ¶
func ExportRun(runID int) (*ExportResponse, error)
type InsertProgramRequest ¶
type InsertProgramResponse ¶
type InsertProgramResponse struct { ProgramID int `json:"program_id"` RunIDs []int `json:"run_ids"` }
func InsertProgram ¶
func InsertProgram(req *InsertProgramRequest) (*InsertProgramResponse, error)
type InsertTaskRequest ¶
type InsertTaskResponse ¶
type InsertTaskResponse struct { TaskID int `json:"task_id"` // If 0, the solution is broken or the server is busy. TaskSolutionScore int64 `json:"task_solution_score"` }
func InsertTask ¶
func InsertTask(req *InsertTaskRequest) (*InsertTaskResponse, error)
type RunAcquireResponse ¶
type RunAddRequest ¶
type RunAddResponse ¶
func RunAdd ¶
func RunAdd(ctx context.Context, req *RunAddRequest) (*RunAddResponse, error)
type RunEvaluateRequest ¶
type RunEvaluateRequest struct {
RunID int `json:"run_id"`
}
type RunEvaluateResponse ¶
type RunEvaluateResponse struct {
RunScore int64 `json:"run_score"`
}
func RunEvaluate ¶
func RunEvaluate(ctx context.Context, req *RunEvaluateRequest) (*RunEvaluateResponse, error)
type RunExtendRequest ¶
type RunExtendRequest struct {
RunSignature string `json:"run_signature" db:"run_signature"`
}
type RunFlushRequest ¶
type SubmitRequest ¶
type SubmitRequest struct { ProblemID int `json:"problem_id"` Name string `json:"name"` ISL []byte `json:"isl"` }
func Submit ¶
func Submit(req *SubmitRequest) (*SubmitRequest, error)
type SubmitResponse ¶
type SubmitResponse struct {
TaskID int `json:"task_id"`
}
type UpdateTaskRequest ¶
type UpdateTaskResponse ¶
type UpdateTaskResponse struct { TaskID int `json:"task_id"` TaskSolutionScore int64 `json:"task_solution_score"` }
func UpdateTask ¶
func UpdateTask(req *UpdateTaskRequest) (*UpdateTaskResponse, error)
Click to show internal directories.
Click to hide internal directories.