about summary refs log tree commit diff
path: root/src/challenge.go
diff options
context:
space:
mode:
authormaride <maride@darknebu.la>2018-08-21 18:49:59 +0200
committermaride <maride@darknebu.la>2018-08-21 18:49:59 +0200
commit07294af77f4b088f67efafbeee79e7ddd0eeac84 (patch)
tree161c510ef65f1051deda57679ba9d3ca404d046e /src/challenge.go
parentf35350d2691007a1b52c3b1e16794ec74702cd0d (diff)
Feature: Start and stop challenge containers
Diffstat (limited to 'src/challenge.go')
-rw-r--r--src/challenge.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/challenge.go b/src/challenge.go
index 38cffee..991e4e5 100644
--- a/src/challenge.go
+++ b/src/challenge.go
@@ -10,11 +10,14 @@ type Challenge struct {
 	Category string
 }
 
+// TODO: The name "Stripped" is a bit inaccurate now. Rename.
 type StrippedChallenge struct {
 	Name string `json:"name"`
 	Description string `json:"description"`
 	Category string `json:"category"`
 	FoundFlag bool `json:"foundFlag"`
+	ContainsLaunchable bool `json:"ContainsLaunchable"`
+	IPAddress string `json:"IPAddress"`
 }
 
 func stripChallenge(c Challenge) (StrippedChallenge) {
@@ -23,5 +26,7 @@ func stripChallenge(c Challenge) (StrippedChallenge) {
 		Description: c.Description,
 		Category: c.Category,
 		FoundFlag: c.FoundFlag,
+		ContainsLaunchable: c.Container != "",
+		IPAddress: getAddressForChallengeContainer(c.Container),
 	}
 }