Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Activate ¶
func Activate(rmbs []RouteMiddlewareBundle) *hitch.Hitch
Activate hitches one or more RouteMiddlewareBundle structs together.
Types ¶
type HttpMethodReceiver ¶
type RouteDatum ¶
type RouteDatum struct { Reciever string // One of: "get", "post", "put", "patch", or "delete". Or a combination of them separated by pipes, e.g.: "post|put" Path string HandlerFunc func(w http.ResponseWriter, req *http.Request) }
RouteDatum encompasses a single route entry.
type RouteMiddlewareBundle ¶
type RouteMiddlewareBundle struct { Middlewares []func(http.Handler) http.Handler RouteData []RouteDatum }
RouteMiddlewareBundle is the struct which represents a group of middleware + route entries.
func (*RouteMiddlewareBundle) Activate ¶
func (rmb *RouteMiddlewareBundle) Activate() *hitch.Hitch
Activate prepares a hitch for a single RouteMiddlewareBundle.
Click to show internal directories.
Click to hide internal directories.