vpn

package
v0.0.0-...-a31e8c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 AddRoutes

func AddRoutes(newRoutes utils.Routes)

AddRoutes adds new routes

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 Logger

func Logger(inner http.Handler, name string) http.Handler

Logger ...

func NewRouter

func NewRouter() *mux.Router

NewRouter creates a new router

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

type VPN

type VPN struct {
	Config string `json:"description,omitempty"`
}

VPN - VPN information

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL