HandlerFromContext returns the Handler found in the context. It accepts fiber.CustomCtx, fiber.Ctx, *fasthttp.RequestCtx, and context.Context. It returns nil if the handler does not exist.
(ctx any)
| 253 | // It accepts fiber.CustomCtx, fiber.Ctx, *fasthttp.RequestCtx, and context.Context. |
| 254 | // It returns nil if the handler does not exist. |
| 255 | func HandlerFromContext(ctx any) *Handler { |
| 256 | if handler, ok := fiber.ValueFromContext[*Handler](ctx, handlerKey); ok { |
| 257 | return handler |
| 258 | } |
| 259 | |
| 260 | return nil |
| 261 | } |
| 262 | |
| 263 | // getRawFromStorage returns the raw value from the storage for the given token |
| 264 | // returns nil if the token does not exist, is expired or is invalid |
no outgoing calls