router

package
v0.0.0-...-57fdbbf Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IRouter

type IRouter interface {
	Handle(path string)
	HandleFunc(path string, f func(http.ResponseWriter, *http.Request)) *mux.Route
	PathPrefix(tpl string) *mux.Route
	Use(mwf ...mux.MiddlewareFunc)
	SetNotFoundHandler(handler func(http.ResponseWriter, *http.Request))
	ServeHTTP(http.ResponseWriter, *http.Request)
}

type MuxRouterAdapter

type MuxRouterAdapter struct {
	MuxRouter *mux.Router
}

func (MuxRouterAdapter) Handle

func (a MuxRouterAdapter) Handle(path string)

Handle Handle

func (MuxRouterAdapter) HandleFunc

func (a MuxRouterAdapter) HandleFunc(path string, f func(http.ResponseWriter, *http.Request)) *mux.Route

HandleFunc HandleFunc

func (MuxRouterAdapter) PathPrefix

func (a MuxRouterAdapter) PathPrefix(tpl string) *mux.Route

PathPrefix PathPrefix

func (MuxRouterAdapter) ServeHTTP

func (a MuxRouterAdapter) ServeHTTP(writer http.ResponseWriter, request *http.Request)

ServeHTTP ServeHTTP

func (MuxRouterAdapter) SetNotFoundHandler

func (a MuxRouterAdapter) SetNotFoundHandler(handler func(http.ResponseWriter, *http.Request))

SetNotFoundHandler SetNotFoundHandler

func (MuxRouterAdapter) Use

func (a MuxRouterAdapter) Use(mwf ...mux.MiddlewareFunc)

Use Use

Jump to

Keyboard shortcuts

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