mrjulienrouter

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func URLPathParam added in v0.17.0

func URLPathParam(r *http.Request, name string) string

Types

type RouterAdapter

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

func New

func New(
	logger mrlog.Logger,
	adapterFunc func(next mrserver.HttpHandlerFunc) http.HandlerFunc,
	notFoundFunc http.HandlerFunc,
	methodNotAllowedFunc http.HandlerFunc,
) *RouterAdapter

func (*RouterAdapter) HandlerFunc

func (rt *RouterAdapter) HandlerFunc(method, path string, handler http.HandlerFunc)

func (*RouterAdapter) Register

func (rt *RouterAdapter) Register(controllers ...mrserver.HttpController)

func (*RouterAdapter) RegisterMiddleware

func (rt *RouterAdapter) RegisterMiddleware(handlers ...func(next http.Handler) http.Handler)

func (*RouterAdapter) ServeHTTP

func (rt *RouterAdapter) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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