Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Answer ¶
type Answer struct { Name string `toml:"name"` Text string `toml:"text" validate:"required"` CodeLineRanges LineRanges `toml:"code_line_ranges" validate:"line_ranges"` }
type Challenge ¶
type Challenge struct { Name string `toml:"name" validate:"required"` Category TaskCategory `toml:"category" validate:"required,oneof=beginner easy concurrency performance wtf"` DefaultCodeSnippet string `toml:"default_code_snippet" validate:"required"` Questions []Question `toml:"questions" validate:"required,dive"` LearningAdvise string `toml:"learning_advise" validate:"required"` LearningLinks []Link `toml:"learning_links" validate:"dive"` }
type LineRanges ¶
type LineRanges [][]int
func (LineRanges) In ¶
func (r LineRanges) In(line int) bool
type Question ¶
type Question struct { Text string `toml:"text" validate:"required"` Type QuestionType `toml:"type" validate:"required,oneof=select_answers code_writing"` Answers []Answer `toml:"answers" validate:"required,dive"` NewCodeSnippet string `toml:"new_code_snippet"` }
func (Question) RightAnswers ¶ added in v0.2.0
type QuestionType ¶
type QuestionType string
const ( SelectAnswers QuestionType = "select_answers" WriteCode QuestionType = "code_writing" )
type TaskCategory ¶
type TaskCategory string
const ( Beginner TaskCategory = "beginner" Easy TaskCategory = "easy" Concurrency TaskCategory = "concurrency" Performance TaskCategory = "performance" WTF TaskCategory = "wtf" )
Click to show internal directories.
Click to hide internal directories.