app

package
v0.49.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware interface {
	// Name returns the name of the middleware.
	Name() string
	// Order returns the order of the middleware. Negative orders register
	// before the route handlers and positive orders after, each sorted
	// ascending; the zero default registers in the before group.
	Order() int
	// Apply applies the middleware to the router.
	Apply(router fiber.Router)
}

Middleware is the route-assembly contract the framework applies to the HTTP router at boot. It is the extension point for anything an application needs to mount outside the /api surface — a webhook receiver, a single-sign-on gateway, a health probe — and is registered with vef.ProvideMiddleware.

The contract lives in this public package rather than beside its implementation because fx collects the middleware group by exact type: a contract an application cannot name is a contract it cannot satisfy, and the group would silently drop whatever it provided instead.

Jump to

Keyboard shortcuts

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