about summary refs log tree commit diff
path: root/src/challenge.go
blob: 38cffeee696ef303503b5abf396584fe888cd265 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main

type Challenge struct {
	Name string
	Description string
	Flag string // this should never leave the server
	FoundFlag bool
	FlagTries uint
	Container string // this could, but is not required as well
	Category string
}

type StrippedChallenge struct {
	Name string `json:"name"`
	Description string `json:"description"`
	Category string `json:"category"`
	FoundFlag bool `json:"foundFlag"`
}

func stripChallenge(c Challenge) (StrippedChallenge) {
	return StrippedChallenge{
		Name: c.Name,
		Description: c.Description,
		Category: c.Category,
		FoundFlag: c.FoundFlag,
	}
}