route

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	http.Handler

	OperationID() string
	Method() string
	Path() string
	PathSegments() path.Segments
	Summary() string
	Description() string
	Deprecated() bool

	Operators() []*operator.Factory
}

func NewHandlers

func NewHandlers(route Route, service string, middlewares ...Middleware) ([]Handler, error)

type Meta

type Meta struct {
	OperationID string
	Method      string
	Path        string
	BasePath    string
	Summary     string
	Description string
	Deprecated  bool
}

func NewMeta

func NewMeta(f *operator.Factory) *Meta

type Middleware

type Middleware = func(http.Handler) http.Handler

func ApplyMiddlewares

func ApplyMiddlewares(mw ...Middleware) Middleware

func MethodOverwrite

func MethodOverwrite() Middleware

type Route

type Route interface {
	String() string
	Range(forEach func(op *operator.Factory, index int) error) error
}

type Router

type Router interface {
	Register(r Router)
	With(routers ...Router) Router
	Routes() Routes
}

func NewRouter

func NewRouter(operators ...operator.Operator) Router

type Routes

type Routes []Route

func (Routes) String

func (routes Routes) String() string

type WithPreHandlerMiddleware

type WithPreHandlerMiddleware interface {
	PreHandlerMiddleware(h http.Handler) http.Handler
}

Jump to

Keyboard shortcuts

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