Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Service = dependency.Service{ Dependencies: fx.Provide( func(router *mux.Router) http.Handler { return router }, ), Constructor: New, }
Service is how the dependency is provided to the dependency builder
Functions ¶
func New404Handler ¶
func New404Handler(provider response.ResponderProvider) http.Handler
New404Handler produces an http.Handler that is used as the default 404 handler
func New405Handler ¶
func New405Handler(provider response.ResponderProvider) http.Handler
New405Handler produces an http.Handler that is used as the default 405 handler
Types ¶
type ApplierFunc ¶
ApplierFunc is a function type that allows routes to be applied to the main router
type Module ¶
type Module struct { Path string Router ApplierFunc }
Module is a group of routes to route to based on a path
func (Module) PathPrefix ¶
PathPrefix returns the path with a slash at the start
type Params ¶
type Params struct { fx.In ResponseProvider response.ResponderProvider Modules []Module `group:"server"` Middlewares []mux.MiddlewareFunc `group:"middleware"` }
Params are the parameters required to build the router
Click to show internal directories.
Click to hide internal directories.