Documentation ¶
Index ¶
Constants ¶
const (
TmpDirPrefix = "xaqt-"
)
Variables ¶
This section is empty.
Functions ¶
func Image ¶
func Image(i string) option
Image configures which docker image should be used for evaluation.
func Path ¶
func Path(p string) option
Path configures the folder with the execution script and "Payload" dir.
func TargetFolder ¶
func TargetFolder(f string) option
TargetFolder configures where the result directory should be created.
Types ¶
type CompilerDetails ¶
type CompilerDetails struct { ExecutionDetails CompositionDetails }
CompilerDetails contains everything XAQT knows about handling a certain language
type Compilers ¶
type Compilers map[string]CompilerDetails
Compilers maps language names to the details of how to execute code in that language.
func ReadCompilers ¶
ReadCompilers reads a compilers map from a file.
type CompositionDetails ¶
type CompositionDetails struct { Boilerplate string `json:"boilerplate"` CommentPrefix string `json:"commentPrefix"` }
CompositionDetails specifies how to write code in a given language
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context creates a execution context for evaluating user code.
func NewContext ¶
NewContext creates a context from a map of compilers and some user provided options.
func (*Context) Languages ¶
func (c *Context) Languages() map[string]CompositionDetails
Languages returns a list of available language names.
type ExecutionDetails ¶
type ExecutionDetails struct { Compiler string `json:"compiler"` SourceFile string `json:"sourceFile"` OptionalExecutable string `json:"optionalExecutable"` CompilerFlags string `json:"compilerFlags"` Disabled string `json:"disabled"` }
ExecutionDetails specifies how to execute certain code.