Home / Type/ Ctx Type — fiber Architecture

Ctx Type — fiber Architecture

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

Entity Profile

Dependency Diagram

graph TD
  4b6b5f5f_5af4_0353_68d7_b239834ac624["Ctx"]
  3cc6866c_9b3e_8c7b_c6ab_dc17a1e4706b["config.go"]
  4b6b5f5f_5af4_0353_68d7_b239834ac624 -->|defined in| 3cc6866c_9b3e_8c7b_c6ab_dc17a1e4706b
  style 4b6b5f5f_5af4_0353_68d7_b239834ac624 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 Ctx type?
Ctx is a type/interface in the fiber codebase, defined in middleware/rewrite/config.go.
Where is Ctx defined?
Ctx 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