Home / Type/ Router Type — fiber Architecture

Router Type — fiber Architecture

Architecture documentation for the Router type/interface in router.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  b45dd415_1a00_f347_371b_8b5d9b57dccf["Router"]
  48efdb11_7716_7309_0a63_433f767560eb["router.go"]
  b45dd415_1a00_f347_371b_8b5d9b57dccf -->|defined in| 48efdb11_7716_7309_0a63_433f767560eb
  style b45dd415_1a00_f347_371b_8b5d9b57dccf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

router.go lines 17–39

type Router interface {
	Use(args ...any) Router

	Get(path string, handler any, handlers ...any) Router
	Head(path string, handler any, handlers ...any) Router
	Post(path string, handler any, handlers ...any) Router
	Put(path string, handler any, handlers ...any) Router
	Delete(path string, handler any, handlers ...any) Router
	Connect(path string, handler any, handlers ...any) Router
	Options(path string, handler any, handlers ...any) Router
	Trace(path string, handler any, handlers ...any) Router
	Patch(path string, handler any, handlers ...any) Router

	Add(methods []string, path string, handler any, handlers ...any) Router
	All(path string, handler any, handlers ...any) Router

	Group(prefix string, handlers ...any) Router

	RouteChain(path string) Register
	Route(prefix string, fn func(router Router), name ...string) Router

	Name(name string) Router
}

Defined In

Frequently Asked Questions

What is the Router type?
Router is a type/interface in the fiber codebase, defined in router.go.
Where is Router defined?
Router is defined in router.go at line 17.

Analyze Your Own Codebase

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

Try Supermodel Free