Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasRole ¶
func HasRole(serverConfig *config.Control, roles ...string) mux.MiddlewareFunc
HasRole returns a middleware function that validates that the request is being made with at least one of the listed roles.
func IsLocalOrHasRole ¶
func IsLocalOrHasRole(serverConfig *config.Control, roles ...string) mux.MiddlewareFunc
IsLocalOrHasRole returns a middleware function that validates that the request is from a local client or has at least one of the listed roles.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.