From 6a66ed60af5ba83d3e9c064d41dbd1b7a0f23468 Mon Sep 17 00:00:00 2001 From: maride Date: Tue, 14 Aug 2018 17:28:47 +0200 Subject: Add challenges --- src/challenge.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/challenge.go (limited to 'src/challenge.go') diff --git a/src/challenge.go b/src/challenge.go new file mode 100644 index 0000000..a1f9893 --- /dev/null +++ b/src/challenge.go @@ -0,0 +1,23 @@ +package main + +type Challenge struct { + Name string + Description string + Flag string // this should never leave the server + 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"` +} + +func stripChallenge(c Challenge) (StrippedChallenge) { + return StrippedChallenge{ + Name: c.Name, + Description: c.Description, + Category: c.Category, + } +} -- cgit 1.4.1