Categorygithub.com/eliquious/xrouter
modulepackage
2.0.6+incompatible
Repository: https://github.com/eliquious/xrouter.git
Documentation: pkg.go.dev

# README

xrouter

A router which combines httprouter and alice for middleware.

# Packages

No description provided by the author

# Functions

HTTPHandler wraps a raw http.Handler in chain middleware.
LogHandler instantiates a new xlog HTTP handler using the given log.
New creates a router which wraps an httprouter.
Param returns a URL parameter by name.

# Constants

ParamsKey is the key for contexts which grant access to the url params.

# Structs

AddHandlerEvent is fired whenever a generic handler is added to the router.
MethodNotAllowedHandlerEvent is fired when a MethodNotAllowed handler is set for the router.
NotFoundHandlerEvent is fired when a NotFound handler is set for the router.

# Interfaces

Event represents router events which will fire as the router is being configured.
Router defines a root router for handling requests.
RouterGroup allows for grouping routes with separate middleware.

# Type aliases

Route is a function with exposes the request context as an argument.