common

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version string
)

Functions

func GetVersion

func GetVersion() string

Types

type ProblemConfig

type ProblemConfig struct {
	Label         string                 `json:"label"`
	Solution      *ProblemConfigSolution `json:"solution,omitempty"`
	Judge         ProblemConfigJudge     `json:"judge"`
	Submit        *ProblemConfigSubmit   `json:"submit,omitempty"`
	InstanceLabel *string                `json:"instanceLabel,omitempty"`
	Instance      *ProblemConfigInstance `json:"instance,omitempty"`
	Variables     map[string]string      `json:"variables,omitempty"`
}

Problem configuration

type ProblemConfigInstance added in v0.2.0

type ProblemConfigInstance struct {
	Adapter string          `json:"adapter"`
	Config  json.RawMessage `json:"config"`
}

For instance config

type ProblemConfigJudge

type ProblemConfigJudge struct {
	Adapter string          `json:"adapter"`
	Config  json.RawMessage `json:"config"`
}

For judge config

type ProblemConfigSolution added in v0.2.0

type ProblemConfigSolution struct {
	MaxSize *int `json:"maxSize,omitempty"`
}

Solution configuration

type ProblemConfigSubmit added in v0.2.0

type ProblemConfigSubmit struct {
	Upload    *bool                    `json:"upload,omitempty"`
	ZipFolder *bool                    `json:"zipFolder,omitempty"`
	Form      *ProblemConfigSubmitForm `json:"form,omitempty"`
}

For submit config

type ProblemConfigSubmitForm added in v0.2.0

type ProblemConfigSubmitForm struct {
	Files []ProblemConfigSubmitFormFile `json:"files"`
}

For submit form

type ProblemConfigSubmitFormEditor added in v0.2.0

type ProblemConfigSubmitFormEditor struct {
	Language string `json:"language"`
}

For submit form editor

type ProblemConfigSubmitFormFile added in v0.2.0

type ProblemConfigSubmitFormFile struct {
	Path        string                          `json:"path"`
	Label       *string                         `json:"label,omitempty"`
	Description *string                         `json:"description,omitempty"`
	Default     *string                         `json:"default,omitempty"`
	Type        ProblemConfigSubmitFormFileType `json:"type"`
}

For submit form file

type ProblemConfigSubmitFormFileType added in v0.2.0

type ProblemConfigSubmitFormFileType struct {
	Editor   *ProblemConfigSubmitFormEditor   `json:"editor,omitempty"`
	Metadata *ProblemConfigSubmitFormMetadata `json:"metadata,omitempty"`
}

For submit form file type

type ProblemConfigSubmitFormMetadata added in v0.2.0

type ProblemConfigSubmitFormMetadata struct {
	Items []ProblemConfigSubmitFormMetadataItem `json:"items"`
}

For submit form metadata

type ProblemConfigSubmitFormMetadataItem added in v0.2.0

type ProblemConfigSubmitFormMetadataItem struct {
	Key         string                                  `json:"key"`
	Label       *string                                 `json:"label,omitempty"`
	Description *string                                 `json:"description,omitempty"`
	Type        ProblemConfigSubmitFormMetadataItemType `json:"type"`
}

For submit form metadata item

type ProblemConfigSubmitFormMetadataItemType added in v0.2.0

type ProblemConfigSubmitFormMetadataItemType struct {
	Text   *struct{} `json:"text,omitempty"`
	Select *struct {
		Options []string `json:"options"`
	} `json:"select,omitempty"`
}

For submit form metadata item type

type SolutionDetails

type SolutionDetails struct {
	Version int                   `json:"version"`
	Jobs    []*SolutionDetailsJob `json:"jobs"`
	Summary string                `json:"summary"`
}

type SolutionDetailsJob

type SolutionDetailsJob struct {
	Name       string                 `json:"name"`
	Score      float64                `json:"score"`
	ScoreScale float64                `json:"scoreScale"`
	Status     string                 `json:"status"`
	Tests      []*SolutionDetailsTest `json:"tests"`
	Summary    string                 `json:"summary"`
}

type SolutionDetailsTest

type SolutionDetailsTest struct {
	Name       string  `json:"name"`
	Score      float64 `json:"score"`
	ScoreScale float64 `json:"scoreScale"`
	Status     string  `json:"status"`
	Summary    string  `json:"summary"`
}

type SolutionInfo

type SolutionInfo struct {
	Score   float64             `json:"score"`
	Metrics *map[string]float64 `json:"metrics,omitempty"`
	Status  string              `json:"status"`
	Message string              `json:"message"`
}

Jump to

Keyboard shortcuts

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