platform: modularize api/gui, add docs-tests-web foundation, and refresh root config
This commit is contained in:
24
selective-vpn-api/app/transport_handlers_actions.go
Normal file
24
selective-vpn-api/app/transport_handlers_actions.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func handleTransportClientAction(w http.ResponseWriter, r *http.Request, id, action string) {
|
||||
if handleTransportVirtualClientAction(w, r, id, action) {
|
||||
return
|
||||
}
|
||||
|
||||
switch action {
|
||||
case "health":
|
||||
handleTransportClientHealthAction(w, r, id)
|
||||
case "metrics":
|
||||
handleTransportClientMetricsAction(w, r, id)
|
||||
case "provision":
|
||||
handleTransportClientProvisionAction(w, r, id)
|
||||
case "start", "stop", "restart":
|
||||
handleTransportClientLifecycleAction(w, r, id, action)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user