router

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	// contains filtered or unexported fields
}

func NewRouter

func NewRouter(caseInsensitivePathMatch bool, errLogFunc func(err error)) *Router

func NewRouterWithDefaultConfig

func NewRouterWithDefaultConfig() *Router

func (*Router) Handle

func (r *Router) Handle(httpMethod string, pathPattern string, handler handler.Handler) *Router

Handle register a new handler or panic if the handler can not be registered This method returns the router so that chain handler registration to be possible

func (*Router) ServeHTTP

func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP implements the http.Handler interface. It's the entry point for all http traffic

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL