Documentation
¶
Index ¶
- type Assets
- type Attachment
- type Checker
- type Dependency
- type Group
- type Interactor
- type JSONStatement
- type Judging
- type Name
- type Parser
- type Problem
- func (p Problem) Attachments() problems.Attachments
- func (p Problem) Checker() problems.Checker
- func (p Problem) EvaluationFiles() []problems.EvaluationFile
- func (p Problem) GetTaskType() problems.TaskType
- func (p Problem) HTMLStatements() problems.Contents
- func (p Problem) InputOutputFiles() (string, string)
- func (p Problem) Languages() []language.Language
- func (p Problem) MemoryLimit() memory.Amount
- func (p Problem) Name() string
- func (p Problem) PDFStatements() problems.Contents
- func (p Problem) Statements() problems.Contents
- func (p Problem) StatusSkeleton(name string) (*problems.Status, error)
- func (p Problem) Tags() (lst []string)
- func (p Problem) TimeLimit() int
- func (p Problem) Titles() problems.Contents
- func (p Problem) Valid() error
- type SampleTest
- type Source
- type Statement
- type Stub
- type Test
- type Testset
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assets ¶
type Assets struct { Attachments []Attachment `xml:"attachments>attachment"` Stubs []Stub `xml:"stubs>stub"` Checker Checker `xml:"checker"` Interactor Interactor `xml:"interactor"` }
type Attachment ¶
type Dependency ¶
type Dependency struct {
Group string `xml:"group,attr"`
}
type Group ¶
type Group struct { Name string `xml:"name,attr"` PointsPolicy string `xml:"points-policy,attr"` Points float64 `xml:"points,attr"` Dependencies []Dependency `xml:"dependencies>dependency"` }
type Interactor ¶
type Interactor struct { Source Source `xml:"source"` // contains filtered or unexported fields }
type JSONStatement ¶
type JSONStatement struct { Locale string `json:"-"` Name string TimeLimit int MemoryLimit int InputFile string OutputFile string Legend *string `json:"legend"` Input *string `json:"input"` Interaction *string `json:"interaction"` Output *string `json:"output"` Scoring *string `json:"scoring"` SampleTests []SampleTest Notes *string `json:"notes"` }
func NewJSONStatement ¶ added in v0.5.0
func NewJSONStatement(r io.ReadCloser, locale string) (*JSONStatement, error)
func ParseJSONStatement ¶
func (JSONStatement) Html ¶
func (j JSONStatement) Html() ([]byte, error)
type Judging ¶
type Parser ¶ added in v0.5.0
func (Parser) Identifier ¶ added in v0.5.0
type Problem ¶
type Problem struct { Path string JSONStatementList []JSONStatement AttachmentsList problems.Attachments GeneratedStatementList problems.Contents TaskType string `xml:"njudge-task-type,attr"` FeedbackType string `xml:"njudge-feedback-type,attr"` Revision int `xml:"revision,attr"` ShortName string `xml:"short-name,attr"` Url string `xml:"url,attr"` Names []Name `xml:"names>name"` StatementList []Statement `xml:"statements>statement"` Judging Judging `xml:"judging"` Assets Assets `xml:"assets"` TagsList []struct { Value string `xml:"value,attr"` } `xml:"tags>tag"` }
func (Problem) Attachments ¶
func (p Problem) Attachments() problems.Attachments
func (Problem) EvaluationFiles ¶ added in v0.4.0
func (p Problem) EvaluationFiles() []problems.EvaluationFile
func (Problem) GetTaskType ¶
func (Problem) HTMLStatements ¶
func (Problem) InputOutputFiles ¶
func (Problem) MemoryLimit ¶
func (Problem) PDFStatements ¶
func (Problem) Statements ¶
func (Problem) StatusSkeleton ¶
type SampleTest ¶
type Test ¶
type Testset ¶
type Testset struct { Name string `xml:"name,attr"` TimeLimit int `xml:"time-limit"` MemoryLimit int `xml:"memory-limit"` TestCount int `xml:"test-count"` InputPathPattern string `xml:"input-path-pattern"` AnswerPathPattern string `xml:"answer-path-pattern"` Tests []Test `xml:"tests>test"` Groups []Group `xml:"groups>group"` }
Click to show internal directories.
Click to hide internal directories.