models

package
v0.0.0-...-20515da Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoRemoveType

type AutoRemoveType struct {
	Containers bool `json:"containers"`
	Files      bool `json:"files"`
}

type CheckJudgeType

type CheckJudgeType struct {
	Enabled  bool  `json:"enabled"`
	Interval int64 `json:"interval"` // interval: minutes
	Requeue  bool  `json:"requeue"`
}

type CompileInfo

type CompileInfo struct {
	BuildArgs   []string    `json:"build_args"`
	Source      string      `json:"source"`
	NoBuild     bool        `json:"no_build"`
	BuildTarget string      `json:"build_target"`
	BuildImage  string      `json:"build_image"`
	Constraints Constraints `json:"constraints"`
	RunArgs     []string    `json:"run_args"`
	RunArgsJSON string      `json:"-"`
	RunImage    string      `json:"run_image"`
}

type ConcurrentType

type ConcurrentType struct {
	Judge uint `json:"judge"`
}

type Constraints

type Constraints struct {
	BuildTimeout int   `json:"build_timeout"` // unit:seconds
	RunTimeout   int   `json:"run_timeout"`   // unit: seconds
	CPU          int64 `json:"cpu"`           // unit: COREs / 1e9
	Memory       int64 `json:"memory"`        // unit: bytes
}

type ExpireType

type ExpireType struct {
	Enabled  bool  `json:"enabled"`
	Interval int64 `json:"interval"` // interval: minutes
}

type ExtensionsType

type ExtensionsType struct {
	HostBind   bool           `json:"host_bind"`
	AutoPull   bool           `json:"auto_pull"`
	CheckJudge CheckJudgeType `json:"check_judge"`
	Expire     ExpireType     `json:"expire"`
}

type JudgeResult

type JudgeResult struct {
	Status    string `json:"status"`
	TimeUsed  uint32 `json:"time_used"`
	SpaceUsed uint32 `json:"space_used"`
}

type JudgerConfigType

type JudgerConfigType struct {
	Kafka       KafkaConfig    `json:"kafka"`
	Rpc         string         `json:"rpc"`
	AutoRemove  AutoRemoveType `json:"auto_remove"`
	Concurrent  ConcurrentType `json:"concurrent"`
	BuildImages []string       `json:"local_images"`
	Languages   []LanguageType `json:"languages"`
	Extensions  ExtensionsType `json:"extensions"`
}

type KafkaConfig

type KafkaConfig struct {
	Brokers []string `json:"brokers"`
}

type LanguageType

type LanguageType struct {
	ID      string      `json:"id"`
	Name    string      `json:"name"`
	Enabled bool        `json:"enabled"`
	Args    CompileInfo `json:"args"`
}

type SupportLanguage

type SupportLanguage struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type TestCaseType

type TestCaseType struct {
	Id         int    `json:"id"`
	StdinPath  string `json:"stdin_path"`
	StdoutPath string `json:"stdout_path"`
	Stdin      []byte `json:"stdin"`
	Stdout     []byte `json:"stdout"`
}

type TestResult

type TestResult struct {
	CaseId    int64  `json:"case_id"`
	Status    string `json:"status"`
	TimeUsed  uint32 `json:"time_used"`
	SpaceUsed uint32 `json:"space_used"`
}

Jump to

Keyboard shortcuts

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