Documentation ¶
Index ¶
- Constants
- Variables
- func Init(path, host, proxy string)
- func ProblemURL(host, contest, problemAlias string) string
- type Info
- func (info *Info) ContestURL(host string) (string, error)
- func (info *Info) Hint() string
- func (info *Info) MySubmissionURL(host string) (string, error)
- func (info *Info) OpenURL(host string) (string, error)
- func (info *Info) Path() string
- func (info *Info) ProblemURL(host string) (string, error)
- func (info *Info) StandingsURL(host string) (string, error)
- func (info *Info) SubmissionURL(host string) (string, error)
- func (info *Info) SubmitURL(host string) (string, error)
- func (info *Info) ToTask() database_client.Task
- type RoundInfo
- type SioClient
- func (c *SioClient) ConfigLogin() (err error)
- func (c *SioClient) DecryptPassword() (string, error)
- func (c *SioClient) Login() (err error)
- func (c *SioClient) Parse(info Info, db *sql.DB) (problems []StatisInfo, paths []string, err error)
- func (c *SioClient) ParseProblem(host, contestID, problemAlias, path string, mu *sync.Mutex) (name string, samples int, standardIO bool, perf util.Performance, err error)
- func (c *SioClient) RaceContest(info Info) (round string, err error)
- func (c *SioClient) Statis(info Info) (problems []StatisInfo, perf util.Performance, err error)
- func (c *SioClient) Submit(info Info, sourcePath string) (err error)
- func (c *SioClient) WatchSubmission(info Info, n int, line bool) (submissions []Submission, err error)
- type StatisInfo
- type Submission
Constants ¶
View Source
const ErrorFetchingProblemSiteFailed = `fetching problem site failed`
View Source
const ErrorNeedCantFindProblemID = "couldn't find problem instance id (maybe a problem with this alias doesn't exist in this contest)"
View Source
const ErrorNeedContest = "you have to specify the contest"
View Source
const ErrorNeedProblemAlias = "you have to specify the Problem alias"
View Source
const ErrorNeedProblemIdentification = "you have to specify the problem alias or the problem instance id"
View Source
const ErrorNeedSubmissionID = "you have to specify the Submission ID"
View Source
const ErrorNoRoundToRace = "there is no round to race in this contest"
View Source
const ErrorParsingProblemsFailed = `parsing some problems failed`
View Source
const ErrorUnrecognizedStatementFormat = `unrecognized statement format`
View Source
const LoginPageRegExp = `<h1>Log in</h1>`
View Source
const StandardIOReg = `(\nKomunikacja\n|\nOpis interfejsu\s+)`
View Source
const SubmissionsPageRegExp = `<title>My submissions[\S\s]+</title>`
Variables ¶
View Source
var ErrorNotLogged = "not logged in"
Functions ¶
func ProblemURL ¶
Types ¶
type Info ¶
type Info struct { Contest string `json:"contest_id"` ProblemID string `json:"problem_id"` ProblemAlias string `json:"problem_alias"` Round string `json:"round"` SubmissionID string `json:"submission_id"` RootPath string }
func (*Info) ToTask ¶
func (info *Info) ToTask() database_client.Task
type SioClient ¶
type SioClient struct { Jar *cookiejar.Jar `json:"cookies"` Username string `json:"handle"` Password string `json:"password"` LastSubmission *Info `json:"last_submission"` // contains filtered or unexported fields }
var Instance *SioClient
func (*SioClient) ConfigLogin ¶
func (*SioClient) DecryptPassword ¶
func (*SioClient) ParseProblem ¶
func (*SioClient) RaceContest ¶
func (*SioClient) Statis ¶
func (c *SioClient) Statis(info Info) (problems []StatisInfo, perf util.Performance, err error)
func (*SioClient) WatchSubmission ¶
type StatisInfo ¶
func (*StatisInfo) ParsePoint ¶
func (prob *StatisInfo) ParsePoint() string
type Submission ¶
type Submission struct {
// contains filtered or unexported fields
}
func (*Submission) ParseID ¶
func (s *Submission) ParseID() string
func (*Submission) ParsePoints ¶
func (s *Submission) ParsePoints() string
func (*Submission) ParseStatus ¶
func (s *Submission) ParseStatus() string
Click to show internal directories.
Click to hide internal directories.