about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-19 17:26:54 +0200
committerEmile <hanemile@protonmail.com>2019-10-19 17:26:54 +0200
commit2aa3476ef53b5eadfb89013660103ac3e6d69def (patch)
treec328bb5b156503a49144e4e1ede2ace59820f301
parented109ea47f6bfecb866e9590f74624ab2270fdd9 (diff)
exporting the struct fields for templating
-rw-r--r--src/structs.go22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/structs.go b/src/structs.go
index f376133..9715d4c 100644
--- a/src/structs.go
+++ b/src/structs.go
@@ -1,11 +1,17 @@
 package main
 
-type challenge struct {
-	name        string
-	description string
-	flag        string
-	container   string
-	category    string
-	points      int
-	static      bool
+// Challenge defines a challenge as in the original companion.json format
+type Challenge struct {
+	Name        string
+	Description string
+	Flag        string
+	Container   string
+	Category    string
+	Points      int
+	Static      bool
+}
+
+// Challenges defines a list of challenges.
+type Challenges struct {
+	Challenge []Challenge
 }