# Packages
No description provided by the author
# Functions
AuthPrincipal the first auth principal that matches the target.
Context returns the request context object.
Error returns a new api error from the error.
Errorf returns a new api error from the string.
IsRequest returns true if the context is an http.Request.
Log returns the logger.
NewResponse returns a response with defaults.
NewServer creates a new server object.
Redirect will set the proper redirect headers and http.StatusFound.
RedirectErrIf does a conditional redirect with the error.
RedirectIf does a conditional redirect.
Request gets the reqest and response objects from the context.
RequestHost returns the host from the current request.
RequestVersion returns the request version in the context.
RequirePrincipal panics with api.ErrUnauthorized on fail.
SessionManager returns the session store from the context.
Unauthorized fails auth and can used by routes in the authorizer chain as an explicit deny, this is useful when there are authorizers with optional components.
Version returns the request version from the context.
VersionMiddleware enforces versioning in the request path.
WithAddr sets the listen address for the server.
WithAuthorizers sets the authorizers for the router.
WithBasepath sets the router basepath for the api.
WithCache enables content caching for the route.
WithContext adds context to the router.
WithCORS sets the cors origin and enables cors on the router.
WithHooks sets the hooks for the router.
WithListener sets the net listener for the server.
WithLog specifies a new logger.
WithRouter specifies the router to use.
WithServerName specifies the server name.
WithSessionManager adds the session store to the router.
WithTracing enables http tracing.
WithVersion sets the specific version for the server.
WithVersioning enables versioning that will enforce a versioned path.
Write writes the raw payload out expeting it to be bytes.
WriteJSON writes json objects.
WriteXML writes an object out as XML.
# Constants
CredentialTypeAPIKey is used for other api key based authentications.
CredentialTypeBasic is http 401 Basic auth.
CredentialTypeBearer is HTTP Bearer token authentication.
PrincipalTypeApplication should be used if the principal is an application.
PrincipalTypeUser should be returned if the principal is a user.
# Variables
ErrAuthUnacceptable should be returned when an authorizer could not find data to decode.
ErrBadRequest should be returned for a bad request or invalid parameters.
ErrConflict should be returned when there is a conflict with resources.
ErrForbidden should be returned when an client is authenticated but not allowed.
ErrNotFound is returned when an object is not found.
ErrNotImplemented is returned when a method is not implemented.
ErrServerError should be returned for internal errors.
ErrTimeout is returned when a request or operation times out.
ErrUnauthorized is returned when authentication has failed or is necessary.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author