routeresolver

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RouteInfo

type RouteInfo struct {
	Route      *routers.Route
	Parameters map[string]string
}

func FromContext

func FromContext(ctx context.Context) (*RouteInfo, error)

type RouteInfoKeyType

type RouteInfoKeyType int
const (
	RouteInfoKey RouteInfoKeyType = iota
)

type RouteResolver

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

RouteResolver performs the relatively costly translation from request URL to an OpenAPI route once and stashes it in the context for easy use by other middlewares.

func New

func New(schema *helpers.Schema) *RouteResolver

func (*RouteResolver) Middleware

func (m *RouteResolver) Middleware(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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