types

package
v0.0.0-...-22e6143 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Challenge

type Challenge struct {
	Name        string `json:"name"`
	Title       string
	Description string `json:"desc"`
	Flag        string `json:"flag"`
	Points      int    `json:"points"`
	URI         string `json:"uri"`
	DepCount    int
	MinRow      int
	Row         int
	Solution    string `json:"solution"`
	Author      string `json:"author"`
	DepIDs      []string
	Deps        []*Challenge
	HasURI      bool // This emerges from URI != ""
}

Challenge is a challenge obv

type ChallengeYAML

type ChallengeYAML struct {
	Name        string   `yaml:"name"`
	Title       string   `yaml:"title"`
	Description string   `yaml:"desc"`
	Solution    string   `yaml:"solution"`
	Author      string   `yaml:"author"`
	Flag        string   `yaml:"flag"`
	Points      int      `yaml:"points"`
	URI         string   `yaml:"uri"`
	Deps        []string `yaml:"deps"`
	HasURI      bool     // This emerges from URI != ""
}

ChallengeYAML is Challenge as YAML

type Challenges

type Challenges []*Challenge

Challenges Array of challenges but in nice with funcitons

func (Challenges) FillChallengeURI

func (c Challenges) FillChallengeURI(host string)

FillChallengeURI Fill host into each challenge's URI field and set HasURI

func (Challenges) Find

func (c Challenges) Find(id string) (*Challenge, error)

Find finds a challenge from a string

Jump to

Keyboard shortcuts

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