ejudge

package
v0.19.5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 15 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"`
	Secret1   string `json:"secret1"`
	UPrinter  string `json:"uprinter"`
}

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) DumpIPs added in v0.19.3

func (ej *Ejudge) DumpIPs(csid string) (io.Reader, error)

func (*Ejudge) DumpProbStats added in v0.19.3

func (ej *Ejudge) DumpProbStats(csid string) (io.Reader, error)

func (*Ejudge) DumpRegPasswords added in v0.19.3

func (ej *Ejudge) DumpRegPasswords(csid string) (io.Reader, error)

func (*Ejudge) DumpRuns added in v0.19.3

func (ej *Ejudge) DumpRuns(csid string) (io.Reader, error)

func (*Ejudge) DumpStandings added in v0.19.3

func (ej *Ejudge) DumpStandings(csid string) (io.Reader, error)

func (*Ejudge) DumpUsers added in v0.19.0

func (ej *Ejudge) DumpUsers(csid string) (io.Reader, error)

func (*Ejudge) FilterRuns

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

func (*Ejudge) FlipUserBan added in v0.19.5

func (ej *Ejudge) FlipUserBan(csid string, uid int) error

func (*Ejudge) FlipUserIncom added in v0.19.5

func (ej *Ejudge) FlipUserIncom(csid string, uid int) error

func (*Ejudge) FlipUserLock added in v0.19.5

func (ej *Ejudge) FlipUserLock(csid string, uid int) error

func (*Ejudge) FlipUserPriv added in v0.19.5

func (ej *Ejudge) FlipUserPriv(csid string, uid int) error

func (*Ejudge) FlipUserVisible added in v0.19.5

func (ej *Ejudge) FlipUserVisible(csid string, uid 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

func (*Ejudge) SendRunComment added in v0.17.2

func (ej *Ejudge) SendRunComment(csid string, runID int, comment string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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