From 28291bf1af8e4f465315404eff6348612fa5c649 Mon Sep 17 00:00:00 2001 From: Emile Date: Thu, 7 Nov 2019 16:24:57 +0100 Subject: simple description --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.md b/README.md index 41cf41b..034e865 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,46 @@ This container exposes and api for all other containers to use. It should be the only container into which the docker-socket is mounted and all containers should communicate with it over an HTTP api. +## Endpoints +### `/` + +IndexHandler + +Handles requests to the "/" endpoint. Returns a small desription of what can be +found where. + +### `/api/companion/getChallenges` + +getChallengesHandler + +get a list of all challenges (this is handled by the manager container as all +that is needed is access to the database which is handled by the manager) + +### `/api/companion/startContainer` + +startChallengeHandler + +Handles starting a challenge and inserting it into the companion network. + +The handler needs a few informations from the user in order to start the right +container in the right context: +- challenge name (the name of the docker-container) +- networkName (the name of the network into which the container should be + inserted into) +- flag (the flag of the challenge) + +The handler returns two things +- the IP of the container +- the container ID + +### `/api/companion/stopContainer` + +stopContainerHandler + +Handles stoping a container + +The handler needs some information about what container to stop it: +- container id + +### `/api/companion/getRunningContainer` -- cgit 1.4.1