Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Challenge ¶
type Challenge struct { Name string `json:"name"` 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
func (Challenge) AllDepsCompleted ¶
AllDepsCompleted checks if User u has completed all Dependent challenges of c
type ChallengeJSON ¶
type ChallengeJSON struct { Name string `json:"name"` Description string `json:"desc"` Solution string `json:"solution"` Author string `json:"author"` Flag string `json:"flag"` Points int `json:"points"` URI string `json:"uri"` Deps []string `json:"deps"` HasURI bool // This emerges from URI != "" }
ChallengeJSON is Challenge as JSON
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
type Config ¶
type Config struct { Port int64 `json:port` Key string `json:key` ChallengeInfoDir string `json:"challinfodir"` SSHHost string `json:"sshhost"` }
Config stores settings loaded from config.json
type User ¶
User, was ist das wohl
func (*User) CalculatePoints ¶
func (u *User) CalculatePoints()
CalculatePoints calculates Points and updates user.Points
func (*User) ComparePassword ¶
ComparePassword checks if the password is valid
func (User) HasSolvedChallenge ¶
HasSolvedChallenge returns true if u has solved chall
Source Files ¶
Click to show internal directories.
Click to hide internal directories.