Documentation ¶
Index ¶
- Variables
- func Accepts(mimes ...string) func(ctx *fiber.Ctx) error
- func Chained(app *fiber.App, middlewares ...fiber.Handler)
- func EnrichSentry() func(ctx *fiber.Ctx) error
- func Idempotency(config *IdempotencyConfig) fiber.Handler
- func InjectI18n() func(c *fiber.Ctx) error
- func InjectValidBody[T any]() func(*fiber.Ctx) error
- func Logger(app *fiber.App)
- func RequestID() fiber.Handler
- func ValidateCategoryAsParam(c *fiber.Ctx) error
- func ValidateServerAsParam(c *fiber.Ctx) error
- func ValidateServerAsQuery(c *fiber.Ctx) error
- type IdempotencyConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var AcceptsJSON = Accepts("application/json")
Functions ¶
func EnrichSentry ¶
func EnrichSentry() func(ctx *fiber.Ctx) error
func Idempotency ¶
func Idempotency(config *IdempotencyConfig) fiber.Handler
func InjectI18n ¶
func InjectI18n() func(c *fiber.Ctx) error
func InjectValidBody ¶
func ValidateCategoryAsParam ¶
func ValidateCategoryAsParam(c *fiber.Ctx) error
func ValidateServerAsParam ¶
func ValidateServerAsParam(c *fiber.Ctx) error
func ValidateServerAsQuery ¶
func ValidateServerAsQuery(c *fiber.Ctx) error
Types ¶
type IdempotencyConfig ¶
type IdempotencyConfig struct { // Lifetime is the maximum lifetime of an idempotency key. Lifetime time.Duration // KeyHeader is the name of the header that contains the idempotency key. KeyHeader string // KeepResponseHeaders is a list of headers that should be kept from the original response. // By default, all headers are kept. KeepResponseHeaders []string // Storage is the storage backend for the idempotency key & its response data. Storage fiber.Storage RedSync *redsync.Redsync // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.