Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Language ¶
type Language interface { Id() string Name() string DefaultFileName() string Compile(Sandbox, File, io.Writer, io.Writer, []File) error Run(Sandbox, io.Reader, io.Reader, io.Writer, time.Duration, int) (Status, error) Test(Sandbox) error }
func StoreAllExcept ¶
type LanguageTest ¶
type LanguageTest struct { Language Language Source string ExpectedVerdict Verdict Input string ExpectedOutput string TimeLimit time.Duration MemoryLimit int }
func (LanguageTest) Run ¶
func (test LanguageTest) Run(sandbox Sandbox) error
type LanguageWrapper ¶
type LanguageWrapper struct { Language // contains filtered or unexported fields }
func (LanguageWrapper) Id ¶
func (lw LanguageWrapper) Id() string
type ListStore ¶
type ListStore struct {
// contains filtered or unexported fields
}
func NewListStore ¶
func NewListStore() *ListStore
type Sandbox ¶
type Sandbox interface { Id() string Init(*log.Logger) error Pwd() string CreateFile(string, io.Reader) error GetFile(string) (io.Reader, error) MakeExecutable(string) error SetMaxProcesses(int) Sandbox Env() Sandbox SetEnv(string) Sandbox AddArg(string) Sandbox TimeLimit(time.Duration) Sandbox MemoryLimit(int) Sandbox Stdin(io.Reader) Sandbox Stderr(io.Writer) Sandbox Stdout(io.Writer) Sandbox MapDir(string, string, []string, bool) Sandbox WorkingDirectory(string) Sandbox Verbose() Sandbox Run(string, bool) (Status, error) Cleanup() error }
type SandboxProvider ¶
type SandboxProvider struct {
// contains filtered or unexported fields
}
func NewSandboxProvider ¶
func NewSandboxProvider() *SandboxProvider
func (*SandboxProvider) Get ¶
func (sp *SandboxProvider) Get() (Sandbox, error)
func (*SandboxProvider) MustGet ¶
func (sp *SandboxProvider) MustGet() Sandbox
func (*SandboxProvider) Put ¶
func (sp *SandboxProvider) Put(s Sandbox)
Click to show internal directories.
Click to hide internal directories.