Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminAccess ¶
AdminAccess is a auth middleware that filters out non admin users
Types ¶
type Guard ¶
type Guard struct { // ParamStruct is an instance of a struct that describes the http params // accepted by an endpoint ParamStruct interface{} // Auth is used to add a auth middleware Auth RouteAuth }
Guard represents a security access system for routes
func (*Guard) ParseParams ¶
func (g *Guard) ParseParams(sources map[string]url.Values, fileHolder formfile.FileHolder) (interface{}, error)
ParseParams parses and returns the list of params needed Returns an error if a required param is missing, or if a type is wrong
Click to show internal directories.
Click to hide internal directories.