Documentation ¶
Index ¶
- func CreateSubmissionEvaluation(db sqlx.Queryer, taskSubmissionId int64, evalTaskVersionId int64, ...) (int64, error)
- func CreateTaskSubmission(db sqlx.Queryer, userId int64, taskId int64, programmingLangId string, ...) (int64, error)
- func CreateUser(db *sqlx.DB, username string, hashed_password string, email string, ...) error
- func DeleteUserById(db *sqlx.DB, id int64) error
- func DoesUserExistByEmail(db *sqlx.DB, email string) (bool, error)
- func DoesUserExistByUsername(db *sqlx.DB, username string) (bool, error)
- type EvalType
- type MarkdownStatement
- type ProgrammingLanguage
- type SubmissionEvaluation
- type Task
- type TaskAuthor
- type TaskSource
- type TaskVersion
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSubmissionEvaluation ¶
func CreateSubmissionEvaluation(db sqlx.Queryer, taskSubmissionId int64, evalTaskVersionId int64, testMaximumTimeMs *int64, testMaximumMemoryKb *int64, testTotalTimeMs int64, testTotalMemoryKb int64, evalStatusId string, evalTotalScore int64, evalPossibleScore int64, compilationStdout *string, compilationStderr *string, compilationTimeMs *int64, compilationMemoryKb *int64) (int64, error)
creates a submission evaluation and returns its id
func CreateTaskSubmission ¶
func CreateTaskSubmission(db sqlx.Queryer, userId int64, taskId int64, programmingLangId string, submission string) (int64, error)
creates a task submission and returns its id
func CreateUser ¶
Types ¶
type MarkdownStatement ¶
type ProgrammingLanguage ¶
type ProgrammingLanguage struct { ID string `db:"id"` FullName string `db:"full_name"` CodeFilename string `db:"code_filename"` CompileCmd *string `db:"compile_cmd"` ExecuteCmd string `db:"execute_cmd"` EnvVersionCmd string `db:"env_version_cmd"` HelloWorldCode string `db:"hello_world_code"` MonacoId string `db:"monaco_id"` }
type SubmissionEvaluation ¶
type SubmissionEvaluation struct { ID int64 `db:"id"` TaskSubmissionID int64 `db:"task_submission_id"` EvalTaskVersionID int64 `db:"eval_task_version_id"` TestMaximumTimeMs *int64 `db:"test_maximum_time_ms"` TestMaximumMemoryKb *int64 `db:"test_maximum_memory_kb"` TestTotalTimeMs int64 `db:"test_total_time_ms"` TestTotalMemoryKb int64 `db:"test_total_memory_kb"` EvalStatusId string `db:"eval_status_id"` EvalTotalScore int64 `db:"eval_total_score"` EvalPossibleScore *int64 `db:"eval_possible_score"` CompilationStdout *string `db:"compilation_stdout"` CompilationStderr *string `db:"compilation_stderr"` CompilationTimeMs *int64 `db:"compilation_time_ms"` CompilationMemoryKb *int64 `db:"compilation_memory_kb"` CreatedAt time.Time `db:"created_at"` UpdateAt time.Time `db:"updated_at"` }
type Task ¶
type TaskAuthor ¶
type TaskSource ¶
type TaskVersion ¶
type TaskVersion struct { ID int64 `db:"id"` TaskID int64 `db:"task_id"` ShortCode string `db:"short_code"` FullName string `db:"full_name"` TimeLimMs int `db:"time_lim_ms"` MemLimKb int `db:"mem_lim_kb"` TestingTypeID string `db:"testing_type_id"` Origin *string `db:"origin"` CreatedAt time.Time `db:"created_at"` UpdatedAt *time.Time `db:"updated_at"` CheckerID *int64 `db:"checker_id"` InteractorID *int64 `db:"interactor_id"` }
func SelectTaskVersionById ¶
func SelectTaskVersionById(db *sqlx.DB, id int64) (*TaskVersion, error)
type User ¶
type User struct { ID int64 `db:"id"` Username string `db:"username"` HashedPassword string `db:"hashed_password"` Email string `db:"email"` FirstName string `db:"first_name"` LastName string `db:"last_name"` CreatedAt time.Time `db:"created_at"` UpdatedAt *time.Time `db:"updated_at"` IsAdmin bool `db:"is_admin"` }
Click to show internal directories.
Click to hide internal directories.