package
0.0.18
Repository: https://github.com/go-mojito/mojito.git
Documentation: pkg.go.dev

# Functions

GetHandler will try to cast the given value into a handler, but will fail if the value is not of type (*)mojito.Handler.
No description provided by the author
HandlerChain will chain a handler func and a middleware together to form a new, single handler func.
No description provided by the author
No description provided by the author
No description provided by the author
NewHandler will introspect the given handler and, if valid, return a new handler instance that can serve a route.
NewRequest will create a new instance of a mojito request for the given http.Request object.
NewResponse will create a new instance of a mojito response for the given http.ResponseWriter object.
RegisterHandlerArgFactory will register a factory function for the given generic type which will enable the generic type to be automatically resolved in all handlers.
RegisterStatefulHandlerArgFactory will register a factory function for the given generic type which will enable the generic type to be automatically resolved in all handlers.

# Variables

ErrorNotAHandler is returned when an attempt to get a handler from an interface{} failed.

# Interfaces

Context defines the basic feature and dataset of a context A context is a set of data that is passed through the middleware chain and finally the handler.
Router defines the minimal surface of a router group compatible with this package.
Handleable defines the interface for a structure that can be used to create a handler.
Handler defines a mojito handler.
HandlerIntrospection is a structure that contains all introspected details about a (potential) handler.
No description provided by the author
No description provided by the author
Router defines the minimal surface of a router compatible with this package.

# Type aliases

HandlerArgFactory defines the signature of handler argument factories.
HandlerFunc describes the method signature of a mojito handler function that can process an incoming mojito.Requests.
MiddlewareHandlerFunc is a special kind of HandlerFunc, that receives the next handler in line as its third parameter.