about summary refs log tree commit diff
path: root/src/companion.go
blob: 521df8040884e31be8ffd020526709af7d4de882 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
companion.go contains the definitions of api endpoints mainly used by the
companion containers for getting a list of all challenges, getting a list of all
running containers and starting and stopping challenge containers.
*/

package main

import "net/http"

// getChallenges returns some json containing a list of all challenges
//
// .../api/companion/getChallenges
func getChallenges(w http.ResponseWriter, r *http.Request) {

}

// getRunningContainers returns a list of all running containers in the network
// with the given uuid
//
// .../api/companion/getRunningContainers?uuid=ASDASD
//
// returns a list of all running containers within the uuid context
func getRunningContainers(w http.ResponseWriter, r *http.Request) {

}

// startContainer starts a challenge container
//
// .../api/companion/startContainer?uuid=ASDASD&challenge=DEFDEFDEF
//
// ASDASDASD is the uuid of the companion container in whose network the
// challenge shoud be inserted into
//
// DEFDEFDEF is the uuid of the challenge
func startContainer(w http.ResponseWriter, r *http.Request) {

}

// stopContainer stops one of the challenge containers
//
// .../api/companion/stopContainer?uuid=ASDASD&challenge=DEFDEFDEF
//
// ASDASDASD is the uuid of the companion container in whose network is the
// challenge is located
//
// DEFDEFDEF is the uuid of the challenge
func stopContainer(w http.ResponseWriter, r *http.Request) {

}