# Packages
No description provided by the author
# Functions
Apply applies giving options against Ctx instance returning context again.
BadRequest implements a http.Handler which returns http.StatusBagRequest always.
BadRequestWithError implements a http.Handler which returns http.StatusBagRequest always.
Combine combines multiple Middleware to return a single http.Handler.
CombineMore combines multiple Middleware to return a new Middleware.
CombineTwo combines two middleware and returns a single http.Handler.
ErrorsAsResponse returns a ContextHandler which will always write out any error that occurs as the response for a request if any occurs.
GetFileMimeType returns associated mime type for giving file extension.
GorillaMuxVars retrieves the parameter lists from the underline variable map provided by the gorilla mux router and stores those into the context.
GzipServe returns a Handler which handles the necessary bits to gzip or ungzip file resonses from a http.FileSystem.
HandlerToContextHandler returns a new ContextHandler from a http.Handler.
HandlerWith defines a function which will return a http.Handler from a ErrorHandler, and a ContextHandler.
HTMLContextFunctions returns a map of tempalte funcs for usage with text/template.Template.
HTTPConditionErrorFunc returns a handler where a condition ContextHandler is called whoes result if with an error is passed to the errorAction for execution else using the noerrorAction.
HTTPConditionFunc retusn a handler where a ContextHandler is used as a condition where if the handler returns an error then the errorAction is called else the noerrorAction gets called with context.
HTTPConditionsFunc returns a ContextHandler where if an error occurs would match the returned error with a ContextHandler to be runned if the match is found.
HTTPFunc returns a http.HandleFunc which wraps the Handler for usage with a server.
HTTPGzipServe returns a Handler which handles the necessary bits to gzip or ungzip file resonses from a http.FileSystem.
HTTPGzipServer returns a http.Handler which handles the necessary bits to gzip or ungzip file resonses from a http.FileSystem.
HTTPRedirect returns a http.Handler which always redirect to the given path.
IdentityHandler returns a non-op http.Handler.
IdentityMW defines a http.Handler function that returns a the next http.Handler passed to it.
JSONError writes the giving error message to the provided writer.
LetsEncryptTLS returns a tls.Config instance which retrieves its its tls certificate from LetsEncrypt service.
LoadTLS loads a tls.Config from a key and cert file path.
Matchable returns MatchableContextHandler using provided arguments.
MatchableFunction returns MatchableContextHandler using provided arguments.
NetworkAuthenticationNeeded implements a http.Handler which returns http.StatusNetworkAuthenticationRequired always.
NewContext returns a new Ctx with the Options slice applied.
NewServer returns a new server which uses http instead of https.
NewServerWithCertMan returns a new server which uses the provided autocert certificate manager to provide http certificate.
NewServerWithTLS returns a new server which uses the provided tlsconfig for https connections.
NoContentRequest implements a http.Handler which returns http.StatusNoContent always.
NotFound implements a http.Handler which returns http.StatusNotFound always.
OKRequest implements a http.Handler which returns http.StatusOK always.
OnDone calls the next http.Handler after the condition handler returns without error.
OnError calls the next ContextHandler after the condition handler returns an error.
OnErrorAccess calls the next ErrorHandler after the condition handler returns an error.
OnNoError calls the next http.Handler after the condition handler returns no error.
ParseAuthorization returns the scheme and token of the Authorization string if it's valid.
ParseTokens parses the base64 encoded token sent as part of the Authorization string, It expects all parts of string to be seperated with ':', returning splitted slice.
ServeHandler returns a http.Handler which serves request to the provided Handler.
SetID sets the id of the giving context.
SetMultipartFormSize sets the expected size for any multipart data.
SetNotFound will return a function to set the NotFound handler for a giving context.
SetPath sets the path of the giving context.
SetRenderer will returns a function to set the render used by a giving context.
SetRequest returns a option function to set the request of a Ctx.
SetResponse returns a option function to set the response of a Ctx.
SetResponseWriter returns a option function to set the response of a Ctx.
StripPrefix returns a middleware which strips the URI of the request of the provided Prefix.
TextContextFunctions returns a map of tempalte funcs for usage with text/template.Template.
Tree returns httptreemux.Handler for use with a httptreemux router.
WaitOnInterrupt will register the needed signals to wait until it recieves a os interrupt singnal and calls any provided functions later.
# Constants
HTTP methods.
HTTP methods.
Time constants.
Time constants.
HTTP methods.
HTTP methods.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Access control.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Security.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
Headers.
MIME types.
MIME types.
MIME types.
MIME types.
MIME types.
MIME types.
MIME types.
MIME types.
MIME types.
MIME types.
MIME types.
MIME types.
MIME types.
MIME types.
MIME types.
MIME types.
MIME types.
MultipartKey defines the key used to store multipart Form.
HTTP methods.
HTTP methods.
HTTP methods.
HTTP methods.
HTTP methods.
Time constants.
Time constants.
# Variables
ErrInvalidRedirectCode is error returned when redirect code is wrong.
ErrNoPush is returned when underline connection does not support Push API.
ErrNoRenderInitiated defines the error returned when a renderer is not set but Ctx.Render() is called.
ErrUnhealthy is returned when a server is considered unhealthy.
# Structs
Ctx defines a http related context object for a request session which is to be served.
HTTPError defines custom error that can be used to specify status code and message.
Response wraps an http.ResponseWriter and implements its interface to be used by an HTTP handler to construct an HTTP response.
Server implements a http server wrapper.
# Interfaces
Handler exposes a method to handle a giving http request but allowing the exposure of any error occuring.
HealthPinger exposes what we expect to provide us a health check for a server.
MatchableContextHandler defines a condition which matches expected error for performing giving action.
Render defines a giving type which exposes a Render method for rendering a custom output from a provided input string and bind object.
# Type aliases
ContextHandler defines a function type which accepts a function type.
ErrorHandler defines a function type which sets giving response to a Response object.
ErrorResponse defines a function which receives the possible error that occurs from a ContextHandler and applies necessary response as needed.
HandlerFunc implements Handler interface.
HandlerFuncMW defines a function which wraps a provided http.handlerFunc which encapsulates the original for a underline operation.
HandlerMW defines a function which wraps a provided http.handlerFunc which encapsulates the original for a underline operation.
Middleware defines a function type which is used to create a chain of handlers for processing giving request.
Options defines a function type which receives a Ctx pointer and sets/modifiers it's internal state values.
TreeHandler defines a function type for the httptreemux.Handler type.