controller

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 46 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HttpHandlers = []interface{}{
	nodeHandlers,
	gwHandlers,
	userHandlers,
	networkHandlers,
	dnsHandlers,
	fileHandlers,
	serverHandlers,
	extClientHandlers,
	ipHandlers,
	loggerHandlers,
	hostHandlers,
	enrollmentKeyHandlers,
	aclHandlers,
	egressHandlers,
	legacyHandlers,
}

HttpHandlers - handler functions for REST interactions

View Source
var HttpMiddlewares = []mux.MiddlewareFunc{
	db.Middleware,
	userMiddleWare,
}

HttpMiddlewares - middleware functions for REST interactions

View Source
var ListRoles = listRoles

Functions

func AuthorizeHost added in v1.5.1

func AuthorizeHost(
	next http.Handler,
) http.HandlerFunc

AuthorizeHost - middleware that authenticates a host via JWT and ensures the host is only operating on its own resources (matched by hostid/nodeid path params).

func GetDNSEntry

func GetDNSEntry(domain string, network string) (models.DNSEntry, error)

GetDNSEntry - gets a DNS entry

func GetExtClientHAConf added in v1.5.1

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

@Summary Get config file HA configuration @Router /api/v1/client_conf/{network} [get] @Tags Config Files @Security oauth @Param network path string true "Network ID" @Success 200 {string} string "WireGuard config file" @Failure 500 {object} models.ErrorResponse @Failure 403 {object} models.ErrorResponse

func HandleRESTRequests

func HandleRESTRequests(wg *sync.WaitGroup, ctx context.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

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