Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HTTPErrorInvalidSnippetID = HTTPError{Status: http.StatusBadRequest, Msg: "Invalid Snippet ID"} HTTPErrorSnippetNotFound = HTTPError{Status: http.StatusNotFound, Msg: "Snippet Not Found"} )
View Source
var (
HTTPErrorLanguageNotFound = HTTPError{Status: http.StatusNotFound, Msg: "Language Not Found"}
)
Functions ¶
func NewDefaultServer ¶
func NewDefaultServer() (h *handler, err error)
Types ¶
type Config ¶
type Config struct { RunTimeout time.Duration `mapstructure:"RUN_TIMEOUT"` Memory int64 `mapstructure:"MEMORY"` NanoCPUs int64 `mapstructure:"NANO_CPUS"` PidsLimit int64 `mapstructure:"PIDS_LIMIT"` NetworkEnabled bool `mapstructure:"NETWORK_ENABLED"` MongoURL string `mapstructure:"MONGO_URL"` MongoDB string `mapstructure:"MONGO_DB"` JSONLogging bool `mapstructure:"JSON_LOGGING"` SnippetSizeLimit int64 `mapstructure:"SNIPPET_SIZE_LIMIT"` ReturnSizeLimit int64 `mapstructure:"RETURN_SIZE_LIMIT"` CorsEnabled bool `mapstructure:"CORS_ENABLED"` HTTPAddr string `mapstructure:"HTTP_ADDR"` DefaultImagePrefix string `mapstructure:"DEFAULT_IMAGE_PREFIX"` LanguagesFile string `mapstructure:"LANGUAGES_FILE"` }
type HTTPError ¶
type Language ¶
type Language struct { ID string `json:"id" toml:"id"` Name string `json:"name,omitempty" toml:"name"` Extension string `json:"extension,omitempty" toml:"extension"` Command string `json:"command,omitempty" toml:"command"` Image string `json:"image,omitempty" toml:"image"` NotRunnable bool `json:"notRunnable,omitempty" toml:"notRunnable"` Tests map[string]LanguageTest `json:"tests,omitempty" toml:"tests"` }
type LanguageTest ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.