package web

import "github.com/tlop503/quicksand/web"

Index

Functions

func HealthHandler

func HealthHandler(w http.ResponseWriter, r *http.Request)

HealthHandler returns if the intended current container is running // GET /api/health

func HomeHandler

func HomeHandler(w http.ResponseWriter, r *http.Request)

HomeHandler serves the root HTML page

func RestartHandler

func RestartHandler(w http.ResponseWriter, r *http.Request)

RestartHandler just calls stop and then start POST /api/restart

func StartHandler

func StartHandler(w http.ResponseWriter, r *http.Request)

StartHandler calls the "start" api for docker containers POST /api/start Optional JSON body: { "image": "publisher/name" }

func StopHandler

func StopHandler(w http.ResponseWriter, r *http.Request)

StopHandler stops and removes the current container POST /api/stop

func SwapHandler

func SwapHandler(w http.ResponseWriter, r *http.Request)

SwapHandler toggles active containers between Tor and Firefox POST /api/restart