Config Type — fiber Architecture
Architecture documentation for the Config type/interface in config.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 4f7791a0_b1a0_eb1e_079a_afdc44ec7113["Config"] 57f193e8_19f3_5c5f_1b14_fb6e19f8db2a["config.go"] 4f7791a0_b1a0_eb1e_079a_afdc44ec7113 -->|defined in| 57f193e8_19f3_5c5f_1b14_fb6e19f8db2a style 4f7791a0_b1a0_eb1e_079a_afdc44ec7113 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/idempotency/config.go lines 15–55
type Config struct {
// Lock locks an idempotency key.
//
// Optional. Default: an in-memory locker for this process only.
Lock Locker
// Storage stores response data by idempotency key.
//
// Optional. Default: an in-memory storage for this process only.
Storage fiber.Storage
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: a function which skips the middleware on safe HTTP request method.
Next func(c fiber.Ctx) bool
// KeyHeaderValidate defines a function to validate the syntax of the idempotency header.
//
// Optional. Default: a function which ensures the header is 36 characters long (the size of an UUID).
KeyHeaderValidate func(string) error
// KeyHeader is the name of the header that contains the idempotency key.
//
// Optional. Default: X-Idempotency-Key
KeyHeader string
// KeepResponseHeaders is a list of headers that should be kept from the original response.
//
// Optional. Default: nil (to keep all headers)
KeepResponseHeaders []string
// Lifetime is the maximum lifetime of an idempotency key.
//
// Optional. Default: 30 * time.Minute
Lifetime time.Duration
// DisableValueRedaction turns off masking idempotency keys in logs and errors when set to true.
//
// Optional. Default: false
DisableValueRedaction bool
}
Defined In
Source
Frequently Asked Questions
What is the Config type?
Config is a type/interface in the fiber codebase, defined in middleware/idempotency/config.go.
Where is Config defined?
Config is defined in middleware/idempotency/config.go at line 15.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free