Documentation
¶
Overview ¶
Package router declares every HTTP route and its access level in one place.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthHandlers ¶
type AuthHandlers struct {
Login, Logout, Me, Setup http.HandlerFunc
Users, AddUser, DeleteUser, SetPassword http.HandlerFunc
Tokens, CreateToken, RevokeToken, AuditLog http.HandlerFunc
}
AuthHandlers serve sessions, setup, users, tokens and the audit log.
type ConfigHandlers ¶
type ConfigHandlers struct {
Overview, Settings, PutSettings, Export http.HandlerFunc
Object, PutObject, DeleteObject, Profiles http.HandlerFunc
PutObjects, Probe http.HandlerFunc
}
ConfigHandlers serve the UI configuration and the profile list.
type DeviceHandlers ¶
type DeviceHandlers struct {
List, Get, Status, Overview http.HandlerFunc
}
DeviceHandlers serve the device endpoints.
type Guards ¶
Guards wrap a route with its access level (spec 9.1): Read for "read" endpoints (open when auth.public_read is set), Admin for "admin" endpoints.
type Handlers ¶
type Handlers struct {
Health http.Handler
Version http.Handler
Site http.Handler
Energy http.Handler
Gauge http.Handler
Report http.Handler
Devices DeviceHandlers
Auth AuthHandlers
Config ConfigHandlers
WS http.Handler
Docs http.Handler
UI http.Handler
}
Handlers are the handlers of all routes.