Documentation
¶
Index ¶
- Constants
- Variables
- type Answer
- type Config
- type FileRequest
- type FileType
- type GroupAnswer
- type PackageAnswer
- type Polygon
- func (p *Polygon) BuildPackage(pID int, full, verify bool) error
- func (p *Polygon) Commit(pID int, minor bool, message string) error
- func (p *Polygon) DownloadPackage(pID, packID int, packType string) ([]byte, error)
- func (p *Polygon) EnableGroups(pID int) error
- func (p *Polygon) EnablePoints(pID int) error
- func (p *Polygon) GetGroups(pID int) ([]GroupAnswer, error)
- func (p *Polygon) GetPackages(pID int) ([]PackageAnswer, error)
- func (p *Polygon) GetProblem(pID int) (*ProblemAnswer, error)
- func (p *Polygon) GetTests(pID int) ([]TestAnswer, error)
- func (p *Polygon) IncrementalScoring(pID int, samples bool) error
- func (p *Polygon) SaveFile(fReq FileRequest) error
- func (p *Polygon) SaveSolution(pID int, name, data string, tag SolutionTag) error
- func (p *Polygon) SaveTags(pID int, tags string) error
- func (p *Polygon) SaveTest(tReq TestRequest) error
- func (p *Polygon) SetChecker(pID int, checker string) error
- func (p *Polygon) SetInteractor(pID int, interactor string) error
- func (p *Polygon) SetValidator(pID int, validator string) error
- func (p *Polygon) UpdateInfo(pr ProblemRequest) error
- func (p *Polygon) UpdateWorkingCopy(pid int) error
- type ProblemAnswer
- type ProblemRequest
- func (pr ProblemRequest) InputFile(name string) ProblemRequest
- func (pr ProblemRequest) Interactive(f bool) ProblemRequest
- func (pr ProblemRequest) MemoryLimit(ml int) ProblemRequest
- func (pr ProblemRequest) OutputFile(name string) ProblemRequest
- func (pr ProblemRequest) TimeLimit(tl int) ProblemRequest
- type SolutionTag
- type TestAnswer
- type TestRequest
Constants ¶
View Source
const (
FullProblemScore = 100
)
Variables ¶
View Source
var ( ErrBadPolygonStatus = errors.New("bad polygon status") ErrInvalidMethod = errors.New("invalid method") ErrProblemNotFound = errors.New("problem not found") )
View Source
var ( ErrAllTestsAreSamples = errors.New("all tests are samples, try -s flag") ErrBadTestsOrder = errors.New("bad tests order, fix in polygon required") )
Functions ¶
This section is empty.
Types ¶
type Answer ¶
type Answer struct { Status string `json:"status"` Comment string `json:"comment"` Result json.RawMessage `json:"result"` }
type FileRequest ¶ added in v0.12.2
func NewFileRequest ¶ added in v0.12.2
func NewFileRequest(pID int, typ FileType, name, file string) FileRequest
func (FileRequest) CheckExisting ¶ added in v0.12.2
func (fr FileRequest) CheckExisting(f bool) FileRequest
TODO: fix it.
func (FileRequest) SourceType ¶ added in v0.12.2
func (fr FileRequest) SourceType(typ string) FileRequest
type GroupAnswer ¶
type PackageAnswer ¶ added in v0.16.0
type Polygon ¶
type Polygon struct {
// contains filtered or unexported fields
}
func NewPolygon ¶
func (*Polygon) BuildPackage ¶ added in v0.16.0
func (*Polygon) DownloadPackage ¶ added in v0.16.0
func (*Polygon) EnableGroups ¶
func (*Polygon) EnablePoints ¶
func (*Polygon) GetPackages ¶ added in v0.16.0
func (p *Polygon) GetPackages(pID int) ([]PackageAnswer, error)
func (*Polygon) GetProblem ¶ added in v0.16.0
func (p *Polygon) GetProblem(pID int) (*ProblemAnswer, error)
func (*Polygon) IncrementalScoring ¶
func (*Polygon) SaveFile ¶ added in v0.12.2
func (p *Polygon) SaveFile(fReq FileRequest) error
func (*Polygon) SaveSolution ¶ added in v0.12.2
func (p *Polygon) SaveSolution(pID int, name, data string, tag SolutionTag) error
func (*Polygon) SaveTest ¶
func (p *Polygon) SaveTest(tReq TestRequest) error
func (*Polygon) SetChecker ¶ added in v0.12.2
func (*Polygon) SetInteractor ¶ added in v0.12.2
func (*Polygon) SetValidator ¶ added in v0.12.2
func (*Polygon) UpdateInfo ¶ added in v0.12.2
func (p *Polygon) UpdateInfo(pr ProblemRequest) error
func (*Polygon) UpdateWorkingCopy ¶ added in v0.16.0
type ProblemAnswer ¶ added in v0.16.0
type ProblemAnswer struct { ID int `json:"id"` Owner string `json:"owner"` Name string `json:"name"` Deleted bool `json:"deleted"` Favourite bool `json:"favourite"` AccessType string `json:"accessType"` Revision int `json:"revision"` LatestPackage int `json:"latestPackage,omitempty"` Modified bool `json:"modified"` }
type ProblemRequest ¶ added in v0.12.2
func NewProblemRequest ¶ added in v0.12.2
func NewProblemRequest(pID int) ProblemRequest
func (ProblemRequest) InputFile ¶ added in v0.12.2
func (pr ProblemRequest) InputFile(name string) ProblemRequest
func (ProblemRequest) Interactive ¶ added in v0.12.2
func (pr ProblemRequest) Interactive(f bool) ProblemRequest
func (ProblemRequest) MemoryLimit ¶ added in v0.12.2
func (pr ProblemRequest) MemoryLimit(ml int) ProblemRequest
func (ProblemRequest) OutputFile ¶ added in v0.12.2
func (pr ProblemRequest) OutputFile(name string) ProblemRequest
func (ProblemRequest) TimeLimit ¶ added in v0.12.2
func (pr ProblemRequest) TimeLimit(tl int) ProblemRequest
type SolutionTag ¶ added in v0.12.2
type SolutionTag string
const ( TagMain SolutionTag = "MA" TagCorrect SolutionTag = "OK" TagIncorrect SolutionTag = "RJ" )
type TestAnswer ¶
type TestRequest ¶
func NewTestRequest ¶
func NewTestRequest(pID int, index int) TestRequest
func (TestRequest) Description ¶ added in v0.12.0
func (tr TestRequest) Description(description string) TestRequest
func (TestRequest) Group ¶
func (tr TestRequest) Group(group string) TestRequest
func (TestRequest) Input ¶ added in v0.12.0
func (tr TestRequest) Input(input string) TestRequest
func (TestRequest) Points ¶
func (tr TestRequest) Points(points float32) TestRequest
func (TestRequest) UseInStatements ¶ added in v0.12.2
func (tr TestRequest) UseInStatements(f bool) TestRequest
Click to show internal directories.
Click to hide internal directories.