lang

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrNoFiles         = Error("ErrNoFiles")
	ErrDockerNew       = Error("ErrDockerNew")
	ErrDockerRun       = Error("ErrDockerRun")
	ErrInvalidLanguage = Error("ErrInvalidLanguage")
	ErrFileIO          = Error("ErrFileIO")
)
View Source
const (
	WarnTimeout            = "WarnTimeout"
	WarnOutputLimitReached = "WarnOutputLimitReached"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error string

func (Error) Error

func (e Error) Error() string

type File

type File struct {
	Name string `json:"name"`
	Text string `json:"text"`
	Main bool   `json:"main,omitempty"`
}

type Input

type Input struct {
	RunID string `json:"-"`
	Lang  string `json:"lang"`
	Files []File `json:"files"`
}

type Output

type Output struct {
	Logs     []string `json:"logs"`
	Images   []string `json:"images,omitempty"`
	Time     string   `json:"time"`
	CPU      float32  `json:"cpu"`
	MEM      float32  `json:"mem"`
	Warnings []string `json:"warnings,omitempty"`
}

func Run

func Run(input Input, extraOpts ...map[string]int) (*Output, error)

type RunOpts

type RunOpts struct {
	Command          string
	Env              []string
	Image            string
	FileName         string
	FileExt          string
	ModifySourceFunc func(string) string
	Postflight       func(*Output)
	Shell            string
	TimeoutCommand   string
	TimeoutSeconds   int
	VolSrcRoot       string
	VolSubPath       string
	WorkingDir       string
}

Jump to

Keyboard shortcuts

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