customRouter

package
v0.0.0-...-96ba605 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 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 MethodRoutePatternInfo

type MethodRoutePatternInfo struct {
	Method  string // It's recommend to use constants of net/httpHandler/method.go
	Pattern string
	Handler http.Handler
}

MethodRoutePatternInfo -

type RoutePatternInfo

type RoutePatternInfo struct {
	Pattern     string
	OtherParams []interface{}
	ServeFunc   func(router *chi.Mux, otherParams ...interface{})
}

RoutePatternInfo -

type RouteStructure

type RouteStructure struct {
	Uses    []func(http.Handler) http.Handler
	Methods []MethodRoutePatternInfo
	Mounts  []RoutePatternInfo
	Routes  map[string]*RouteStructure
	Groups  []RouteStructure
}

RouteStructure -

func (RouteStructure) PrepareRoutes

func (routeStructure RouteStructure) PrepareRoutes(router *chi.Mux)

PrepareRoutes -

Jump to

Keyboard shortcuts

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