controller

package
v0.0.0-...-4811bbc Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const STATICPATH string = "static/"

Variables

View Source
var Uclient *unifi.Client

Functions

func AddAllowedSubnet

func AddAllowedSubnet(s string) error

func ApiStatus

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

func ApiVoucherConsume

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

func LoadConfig

func LoadConfig()

func NewUserCookie

func NewUserCookie(w http.ResponseWriter, id string)

func NewUsersRouter

func NewUsersRouter() *mux.Router

func OAuthRedirect

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

func Root

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

func SubnetFenceMiddleware

func SubnetFenceMiddleware(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)

func UniFiCallback

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

func UniFiClientInit

func UniFiClientInit()

func UsersAuthorisationApi

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

func UsersDeleteApi

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

func UsersView

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

Types

type ConfigS

type ConfigS struct {
	ClientId     string
	ClientSecret string
	ProxyMode    bool
	Domain       string
	UniFi        struct {
		Username     string
		Password     string
		BaseUrl      string
		Site         string
		InsecureMode bool
	}
	AllowedSubnets []Subnet
	Custom         struct {
		Name    string
		Subtext string
	}
}
var Config ConfigS

type Subnet

type Subnet struct {
	Ip    net.IP
	IpNet *net.IPNet
	Count uint8
}

Jump to

Keyboard shortcuts

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