Home / Type/ Config Type — fiber Architecture

Config Type — fiber Architecture

Architecture documentation for the Config type/interface in config.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  e39f683d_06a7_e8d7_b630_6c5401286809["Config"]
  3cc6866c_9b3e_8c7b_c6ab_dc17a1e4706b["config.go"]
  e39f683d_06a7_e8d7_b630_6c5401286809 -->|defined in| 3cc6866c_9b3e_8c7b_c6ab_dc17a1e4706b
  style e39f683d_06a7_e8d7_b630_6c5401286809 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/rewrite/config.go lines 10–25

type Config struct {
	// Next defines a function to skip middleware.
	// Optional. Default: nil
	Next func(fiber.Ctx) bool

	// Rules defines the URL path rewrite rules. The values captured in asterisk can be
	// retrieved by index e.g. $1, $2 and so on.
	// Required. Example:
	// "/old":              "/new",
	// "/api/*":            "/$1",
	// "/js/*":             "/public/javascript/$1",
	// "/users/*/orders/*": "/user/$1/order/$2",
	Rules map[string]string

	rulesRegex map[*regexp.Regexp]string
}

Frequently Asked Questions

What is the Config type?
Config is a type/interface in the fiber codebase, defined in middleware/rewrite/config.go.
Where is Config defined?
Config is defined in middleware/rewrite/config.go at line 10.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free