Documentation
¶
Index ¶
- Variables
- func AddRoutes(newRoutes utils.Routes)
- func DownloadOpenVPNlog(w http.ResponseWriter, r *http.Request)
- func IsEnabled(w http.ResponseWriter, r *http.Request)
- func Logger(inner http.Handler, name string) http.Handler
- func NewRouter() *mux.Router
- func SetEnable(w http.ResponseWriter, r *http.Request)
- func UploadOpenVPNConfig(w http.ResponseWriter, r *http.Request)
- type VPN
Constants ¶
This section is empty.
Variables ¶
View Source
var Routes = utils.Routes{ utils.Route{ Name: "UploadOpenVPNConfig", Method: "PUT", Pattern: "/rest/default/config", HandlerFunc: UploadOpenVPNConfig, }, utils.Route{ Name: "IsEnabled", Method: "GET", Pattern: "/rest/default/enable", HandlerFunc: IsEnabled, }, utils.Route{ Name: "SetEnable", Method: "PUT", Pattern: "/rest/default/enable", HandlerFunc: SetEnable, }, utils.Route{ Name: "DownloadOpenVPNlog", Method: "GET", Pattern: "/rest/default/log", HandlerFunc: DownloadOpenVPNlog, }, }
Routes returns all of the api route for the Controller
Functions ¶
func DownloadOpenVPNlog ¶
func DownloadOpenVPNlog(w http.ResponseWriter, r *http.Request)
DownloadOpenVPNlog Provides log content
func IsEnabled ¶
func IsEnabled(w http.ResponseWriter, r *http.Request)
IsEnabled Returns the enable state if config exists
func SetEnable ¶
func SetEnable(w http.ResponseWriter, r *http.Request)
SetEnable Sets the enable state if config exists
func UploadOpenVPNConfig ¶
func UploadOpenVPNConfig(w http.ResponseWriter, r *http.Request)
UploadOpenVPNConfig Uploads OpenVPN config
Types ¶
Click to show internal directories.
Click to hide internal directories.