models

package
v0.0.0-...-7753288 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2017 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Tasks = []*Task{
		{
			Id:             123456,
			Name:           "Task 1",
			Description:    "Determine if number is floating",
			DefaultInput:   "1e2\nf\n1e-3",
			ExpectedOutput: "True\nFalse\nTrue",
		},
		{
			Id:             123457,
			Name:           "Task 2",
			Description:    "Task 1",
			DefaultInput:   "1e2\nf\n1e-3",
			ExpectedOutput: "True\nFalse\nTrue",
		},
		{
			Id:             123458,
			Name:           "Task 3",
			Description:    "Task 1",
			DefaultInput:   "1e2\nf\n1e-3",
			ExpectedOutput: "True\nFalse\nTrue",
		},
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Command  []string `json:"command"`
	Language string   `json:"language"`
	Version  string   `json:"version"`
}

type Image

type Image struct {
	Name string   `json:"name"`
	Tags []string `json:"tags"`
}

func GetImages

func GetImages() ([]Image, error)

type Task

type Task struct {
	Id             int    `json:"id"`
	Name           string `json:"name"`
	Description    string `json:"description"`
	DefaultInput   string `json:"defaultInput"`
	ExpectedOutput string `json:"expectedOutput"`
}

type Work

type Work struct {
	ContainerName string  `json:"containerName"`
	Task          *Task   `json:"task"`
	Path          string  `json:"path"`
	Input         string  `json:"input"`
	Output        string  `json:"output"`
	Config        *Config `json:"config"`
}

func (*Work) LaunchWork

func (w *Work) LaunchWork() error

func (*Work) ReadInput

func (w *Work) ReadInput() (string, error)

func (*Work) ReadOutput

func (w *Work) ReadOutput() (string, error)

func (*Work) Validate

func (w *Work) Validate() error

func (*Work) WriteInput

func (w *Work) WriteInput(s string) error

Jump to

Keyboard shortcuts

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