Home / Type/ OnRouteHandler Type — fiber Architecture

OnRouteHandler Type — fiber Architecture

Architecture documentation for the OnRouteHandler type/interface in hooks.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  9e767cd2_e21d_9ae5_2ef1_c4508c457837["OnRouteHandler"]
  12bfb898_b1c5_c958_dabc_608c81f56f8f["hooks.go"]
  9e767cd2_e21d_9ae5_2ef1_c4508c457837 -->|defined in| 12bfb898_b1c5_c958_dabc_608c81f56f8f
  style 9e767cd2_e21d_9ae5_2ef1_c4508c457837 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

hooks.go lines 9–32

type (
	// OnRouteHandler defines the hook signature invoked whenever a route is registered.
	OnRouteHandler = func(Route) error
	// OnNameHandler shares the OnRouteHandler signature for route naming callbacks.
	OnNameHandler = OnRouteHandler
	// OnGroupHandler defines the hook signature invoked whenever a group is registered.
	OnGroupHandler = func(Group) error
	// OnGroupNameHandler shares the OnGroupHandler signature for group naming callbacks.
	OnGroupNameHandler = OnGroupHandler
	// OnListenHandler runs when the application begins listening and receives the listener details.
	OnListenHandler = func(ListenData) error
	// OnPreStartupMessageHandler runs before Fiber prints the startup banner.
	OnPreStartupMessageHandler = func(*PreStartupMessageData) error
	// OnPostStartupMessageHandler runs after Fiber prints (or skips) the startup banner.
	OnPostStartupMessageHandler = func(*PostStartupMessageData) error
	// OnPreShutdownHandler runs before the application shuts down.
	OnPreShutdownHandler = func() error
	// OnPostShutdownHandler runs after shutdown and receives the shutdown result.
	OnPostShutdownHandler = func(error) error
	// OnForkHandler runs inside a forked worker process and receives the worker ID.
	OnForkHandler = func(int) error
	// OnMountHandler runs after a sub-application mounts to a parent and receives the parent app reference.
	OnMountHandler = func(*App) error
)

Defined In

Frequently Asked Questions

What is the OnRouteHandler type?
OnRouteHandler is a type/interface in the fiber codebase, defined in hooks.go.
Where is OnRouteHandler defined?
OnRouteHandler is defined in hooks.go at line 9.

Analyze Your Own Codebase

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

Try Supermodel Free