Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHTTPRouterParams ¶
func GetHTTPRouterParams(r *http.Request) httprouter.Params
GetHTTPRouterParams retrieves httprouter params from context
func NewBunRouterAdapter ¶
func NewBunRouterAdapter() forge.RouterAdapter
NewBunRouterAdapter creates a BunRouter adapter (default)
func NewChiAdapter ¶
func NewChiAdapter() forge.RouterAdapter
NewChiAdapter creates a Chi router adapter
func NewHTTPRouterAdapter ¶
func NewHTTPRouterAdapter() forge.RouterAdapter
NewHTTPRouterAdapter creates an HTTPRouter adapter
Types ¶
type BunRouterAdapter ¶
type BunRouterAdapter struct {
// contains filtered or unexported fields
}
BunRouterAdapter wraps uptrace/bunrouter
func (*BunRouterAdapter) Handle ¶
func (a *BunRouterAdapter) Handle(method, path string, handler http.Handler)
Handle registers a route
func (*BunRouterAdapter) Mount ¶
func (a *BunRouterAdapter) Mount(path string, handler http.Handler)
Mount registers a sub-handler
func (*BunRouterAdapter) ServeHTTP ¶
func (a *BunRouterAdapter) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP dispatches requests
type ChiAdapter ¶
type ChiAdapter struct {
// contains filtered or unexported fields
}
ChiAdapter wraps go-chi/chi router
func (*ChiAdapter) Handle ¶
func (a *ChiAdapter) Handle(method, path string, handler http.Handler)
Handle registers a route
func (*ChiAdapter) Mount ¶
func (a *ChiAdapter) Mount(path string, handler http.Handler)
Mount registers a sub-handler
func (*ChiAdapter) ServeHTTP ¶
func (a *ChiAdapter) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP dispatches requests
type HTTPRouterAdapter ¶
type HTTPRouterAdapter struct {
// contains filtered or unexported fields
}
HTTPRouterAdapter wraps julienschmidt/httprouter
func (*HTTPRouterAdapter) Close ¶
func (a *HTTPRouterAdapter) Close() error
Close cleans up resources
func (*HTTPRouterAdapter) Handle ¶
func (a *HTTPRouterAdapter) Handle(method, path string, handler http.Handler)
Handle registers a route
func (*HTTPRouterAdapter) Mount ¶
func (a *HTTPRouterAdapter) Mount(path string, handler http.Handler)
Mount registers a sub-handler
func (*HTTPRouterAdapter) ServeHTTP ¶
func (a *HTTPRouterAdapter) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP dispatches requests
Click to show internal directories.
Click to hide internal directories.