handler

package
v0.0.0-...-ca8e88b Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONTEST_META_FILE = "contest.json"
	TASK_META_FILE    = "task.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContestMeta

type ContestMeta struct {
	ContestID string            `json:"contest_id"`
	Tasks     []*atcodergo.Task `json:"tasks"`
}

type GlobalConfig

type GlobalConfig struct {
	SessionFile          string             `json:"session_file"`
	TemplateCmdName      string             `json:"template_cmd_name"`
	TemplateCmdArgs      []string           `json:"template_cmd_args"`
	TemplateCmdJsonInput bool               `json:"template_cmd_json_input"`
	TemplateFile         string             `json:"template_file"`
	RunCmdName           string             `json:"run_cmd_name"`
	RunCmdArgs           []string           `json:"run_cmd_args"`
	MainFileName         string             `json:"main_file_name"`
	DefaultLanguage      atcodergo.Language `json:"default_language"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(configFile string, defauldConfig *GlobalConfig) (*Handler, error)

func (*Handler) Login

func (h *Handler) Login() error

func (*Handler) NewContest

func (h *Handler) NewContest(contestID, templateFile string) error

func (*Handler) ShowGlobalConfig

func (h *Handler) ShowGlobalConfig() error

ShowGlobalConfig shows global config.

func (*Handler) Submit

func (h *Handler) Submit() error

func (*Handler) Test

func (h *Handler) Test() error

Test runs program with execution template. Show assertion results. Returns early if err (like compile err).

type TaskMeta

type TaskMeta struct {
	ContestID string          `json:"contest_id"`
	Task      *atcodergo.Task `json:"task"`
	MainFile  string          `json:"main_file"`
}

Jump to

Keyboard shortcuts

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