route

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 19 Imported by: 0

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