package
0.0.0-20220116124430-3492e0ae15bf
Repository: https://github.com/hozalex/knox.git
Documentation: pkg.go.dev
# Functions
AddDefaultAccess adds an access to every created key.
AddHeader adds a HTTP header to the response.
AddPrincipalValidator applies additional, custom validation on principals submitted to Knox for adding into ACLs.
Authentication sets the principal or returns an error if the principal cannot be authenticated.
GetAPIError gets the HTTP error that will be returned from the server.
GetParams gets the parameters for the request through the parameters context.
GetPrincipal gets the principal authenticated through the authentication decorator.
GetRouteID gets the short form function name for the route being called.
GetRouter creates the mux router that serves knox routes.
Logger logs the request and response information in json format to the logger given.
NewKeyManager builds a struct for interfacing with the keydb.
# Variables
HTTPErrMap is a mapping from err subcodes to the http err response that will be returned.
# Interfaces
KeyManager is the interface for logic related to managing keys.
Parameter is an interface through which route-specific Knox API Parameters can be specified.
# Type aliases
PostParameter is an implementation of the Parameter interface that extracts values embedded in the web form transmitted in the request body.
QueryParameter is an implementation of the Parameter interface that extracts specific parameter values from the query string of the request URL as referenced in section 3.4 of RFC2396.
RawQueryParameter is an implementation of the Parameter interface that extracts the complete query string from the request URL as referenced in section 3.4 of RFC2396.
UrlParameter is an implementation of the Parameter interface that extracts parameter values from the URL as referenced in section 3.3 of RFC2396.