model

package
v0.0.0-...-98441cc Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NesoMessageEntryKind = "entry"
	NesoMessageDraftKind = "draft"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Compilation

type Compilation struct {
	Status        string
	Tries         int
	Stdout        string
	Stderr        string
	Time          float64
	WallClockTime float64
	Memory        int
}

type DraftResult

type DraftResult struct {
	DatasetID int
	EntryID   int
	Compilation
	Evaluation
	Execution
}

type Entry

type Entry struct {
	ID          int
	ContestID   int
	ContestSlug string
	TaskID      int
	TaskSlug    string
	DatasetID   int
	Language    string
	Token       bool
}

func (Entry) ResultID

func (e Entry) ResultID() string

type EntrySource

type EntrySource struct {
	Filename string `json:"filename"`
	FileID   string `json:"fileid"`
	Language string `json:"language"`
	Content  string `json:"content"`
}

type EntrySubmitTrx

type EntrySubmitTrx struct {
	ID        string
	CreatedAt time.Time
	UpdatedAt time.Time
	Status    string
	EntryID   int
	ResultID  string
}

type Evaluation

type Evaluation struct {
	Done  bool
	Tries int
}

type Execution

type Execution struct {
	Time          float64
	WallClockTime float64
	Memory        int
	Output        []byte
}

type NesoMessage

type NesoMessage struct {
	Kind         string          `json:"kind"`
	Auth         NesoMessageAuth `json:"auth"`
	Transaction  NesoMessageTrx  `json:"transaction"`
	EntryPayload struct {
		ContestSlug string         `json:"contestSlug"`
		TaskSlug    string         `json:"taskSlug"`
		Token       bool           `json:"token"`
		Sources     []*EntrySource `json:"sources"`
	} `json:"entry"`
}

type NesoMessageAuth

type NesoMessageAuth struct {
	Cookies []string `json:"cookies"`
}

type NesoMessageTrx

type NesoMessageTrx struct {
	ID string `json:"id"`
}

type Result

type Result struct {
	DatasetID int
	EntryID   int
	Compilation
	Evaluation
	Scoring
}

type Scoring

type Scoring struct {
	TaskScore    float64
	ContestScore float64
}

Jump to

Keyboard shortcuts

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