model

package
v0.0.0-...-a152fe2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INTERNAL_ERROR = -1
	RUNTIME_ERROR  = -2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildError

type BuildError struct {
	Filename  string `json:"filename"`
	Message   string `json:"message"`
	Line      int    `json:"line"`
	Character int    `json:"character"`
}

type RunResult

type RunResult struct {
	Success bool         `json:"success"`
	Message string       `json:"message"`
	Builds  []BuildError `json:"builds"`
	Tests   []TestResult `json:"tests"`
}

run stage model

type SandboxExecResult

type SandboxExecResult struct {
	Error  error
	Stdout bytes.Buffer
	Stderr bytes.Buffer
}

type SourceCode

type SourceCode struct {
	SourceCodeTest string       `json:"src_test"`
	SourceCodes    []SourceFile `json:"src"`
}

type SourceFile

type SourceFile struct {
	Filename   string `json:"filename"`
	Path       string `json:"path,omitempty"`
	SourceCode string `json:"src"`
}

type Submission

type Submission struct {
	Id             string       `json:"id"`
	Type           string       `json:"type"`
	SourceCodeTest string       `json:"src_test"`
	SourceFiles    []SourceFile `json:"src"`
}

type TestResult

type TestResult struct {
	Status string `json:"status"` // PASSED or FAILED
	Name   string `json:"name"`
	Output string `json:"output"`
	Order  int    `json:"order"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL