ejudge

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const BadSID = "0000000000000000"

Variables

View Source
var (
	ErrParseMasterSID = errors.New("can't parse master SID")
	ErrBadStatusCode  = errors.New("bad status code")
	ErrBadFilter      = errors.New("bad filter expression")
	ErrUnknownVerdict = errors.New("unknown verdict")
)
View Source
var Verdicts = map[string]int{
	"OK":      0,
	"IG":      9,
	"DQ":      10,
	"SV":      14,
	"PR":      16,
	"RJ":      17,
	"SM":      23,
	"rejudge": 99,
}

Functions

This section is empty.

Types

type Config

type Config struct {
	URL       string `json:"url"`
	Login     string `json:"login"`
	Password  string `json:"password"`
	JudgesDir string `json:"judgesDir"`
}

type Ejudge

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

func NewEjudge

func NewEjudge(cfg *Config) *Ejudge

func (*Ejudge) ChangeRunStatus added in v0.11.0

func (ej *Ejudge) ChangeRunStatus(csid string, runID int, status string) error

func (*Ejudge) CheckContest

func (ej *Ejudge) CheckContest(sid string, cid int, verbose bool) error

func (*Ejudge) Commit

func (ej *Ejudge) Commit(sid string) error

func (*Ejudge) CreateContest

func (ej *Ejudge) CreateContest(sid string, cid int, tid int) error

func (*Ejudge) FilterRuns

func (ej *Ejudge) FilterRuns(csid string, filter string, count int) ([]int, error)

func (*Ejudge) Lock

func (ej *Ejudge) Lock(sid string, cid int) error

func (*Ejudge) Login

func (ej *Ejudge) Login() (string, error)

func (*Ejudge) Logout

func (ej *Ejudge) Logout(sid string) error

not sure it's working.

func (*Ejudge) MakeInvisible

func (ej *Ejudge) MakeInvisible(sid string, cid int) error

func (*Ejudge) MakeVisible

func (ej *Ejudge) MakeVisible(sid string, cid int) error

func (*Ejudge) MasterLogin

func (ej *Ejudge) MasterLogin(sid string, cid int) (string, error)

func (*Ejudge) RegisterUser added in v0.13.0

func (ej *Ejudge) RegisterUser(csid, login string) error

func (*Ejudge) ReloadConfig

func (ej *Ejudge) ReloadConfig(csid string) error

Jump to

Keyboard shortcuts

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