Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddProgLang ¶
func AddProgLang(name, extension string, runner CodeRunner)
Types ¶
type Anubis ¶
type Anubis struct { Logger *slog.Logger CommandRunner CommandRunner }
func NewAnubis ¶
func NewAnubis(ac AnubisConfig) Anubis
func (*Anubis) NewSubmission ¶
func (a *Anubis) NewSubmission(codeFilePath string, testCases TestCases) Submission
type AnubisConfig ¶
type AnubisConfig struct { Logger *slog.Logger CommandRunner CommandRunner }
type CodeRunner ¶
type CodeRunner func(codeFile string, commandRunner CommandRunner) (RunOutput, error)
type CommandRunner ¶
type LineChecker ¶
maps test input files with their expected output files
type LocalCmdRunner ¶
func (*LocalCmdRunner) RunCommand ¶
func (lcr *LocalCmdRunner) RunCommand(command *exec.Cmd) (RunOutput, error)
func (*LocalCmdRunner) SetInput ¶
func (lcr *LocalCmdRunner) SetInput(file *os.File)
type LocalIsolateRunner ¶
func (*LocalIsolateRunner) RunCommand ¶
func (lir *LocalIsolateRunner) RunCommand(command *exec.Cmd) (RunOutput, error)
func (*LocalIsolateRunner) SetInput ¶
func (lir *LocalIsolateRunner) SetInput(file *os.File)
type ProgLang ¶
type ProgLang struct { Name string Runner CodeRunner }
Programming Languages
func GetProgLang ¶
type RunOutput ¶
func PythonRunner ¶
func PythonRunner(codeFile string, commandRunner CommandRunner) (RunOutput, error)
type Submission ¶
type Submission struct { CodeFile string TestCases TestCases CommandRunner CommandRunner Logger *slog.Logger }
func (*Submission) CheckAll ¶
func (s *Submission) CheckAll() (SubmissionOut, error)
type SubmissionOut ¶
type SubmissionStatus ¶
type SubmissionStatus int
const ( AC SubmissionStatus = iota CompileError RunTimeError Failed InternalError )
type TestCases ¶
type TestCases struct { InputOutput map[string]string LineChecker LineChecker }
Click to show internal directories.
Click to hide internal directories.