Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler interface {
ServeHTTP(http.ResponseWriter, *http.Request, RoutingInfo)
}
Handler interface that must be implemented by custom structs.
type RouteHandler ¶
type RouteHandler func(http.ResponseWriter, *http.Request, RoutingInfo)
RouteHandler is the function construct called by this framework.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router is the main struct for the whole routing logic.
func (*Router) HandleFunc ¶
func (router *Router) HandleFunc(method string, path string, handler RouteHandler) error
HandleFunc registers a new handler function using method and path for execution.
type RoutingInfo ¶
RoutingInfo is returned for each web server method call and includes details abount the execution.
Click to show internal directories.
Click to hide internal directories.