about summary refs log tree commit diff
path: root/src/challenge.go
diff options
context:
space:
mode:
authormaride <maride@darknebu.la>2018-08-14 17:28:47 +0200
committermaride <maride@darknebu.la>2018-08-14 17:28:47 +0200
commit6a66ed60af5ba83d3e9c064d41dbd1b7a0f23468 (patch)
tree5c940674cfbcc93b52eb9ed87c78f1236976a859 /src/challenge.go
parent728e93e07648adb84c83f77687077d18987e0319 (diff)
Add challenges
Diffstat (limited to 'src/challenge.go')
-rw-r--r--src/challenge.go23
1 files changed, 23 insertions, 0 deletions
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,
+	}
+}