Documentation
¶
Index ¶
- Variables
- func ConvertRequest(c fiber.Ctx, forServer bool) (*http.Request, error)
- func CopyContextToFiberContext(src any, requestContext *fasthttp.RequestCtx)deprecated
- func FiberApp(app *fiber.App) http.HandlerFunc
- func FiberHandler(h fiber.Handler) http.Handler
- func FiberHandlerFunc(h fiber.Handler) http.HandlerFunc
- func HTTPHandler(h http.Handler) fiber.Handler
- func HTTPHandlerFunc(h http.HandlerFunc) fiber.Handler
- func HTTPHandlerWithContext(h http.Handler) fiber.Handler
- func HTTPMiddleware(mw func(http.Handler) http.Handler) fiber.Handler
- func LocalContextFromHTTPRequest(r *http.Request) (context.Context, bool)
Constants ¶
This section is empty.
Variables ¶
var ( ErrRemoteAddrEmpty = errors.New("remote address cannot be empty") ErrRemoteAddrTooLong = errors.New("remote address too long") )
Functions ¶
func ConvertRequest ¶
ConvertRequest converts a fiber.Ctx to a http.Request. forServer should be set to true when the http.Request is going to be passed to a http.Handler.
func CopyContextToFiberContext
deprecated
func CopyContextToFiberContext(src any, requestContext *fasthttp.RequestCtx)
CopyContextToFiberContext copies the values of context.Context to a fasthttp.RequestCtx. This function safely handles struct fields, using unsafe operations only when necessary for unexported fields.
Deprecated: This function uses reflection and unsafe pointers; consider using explicit context passing.
func FiberApp ¶
func FiberApp(app *fiber.App) http.HandlerFunc
FiberApp wraps fiber app to net/http handler func
func FiberHandler ¶
FiberHandler wraps fiber handler to net/http handler
func FiberHandlerFunc ¶
func FiberHandlerFunc(h fiber.Handler) http.HandlerFunc
FiberHandlerFunc wraps fiber handler to net/http handler func
func HTTPHandler ¶
HTTPHandler wraps net/http handler to fiber handler
func HTTPHandlerFunc ¶
func HTTPHandlerFunc(h http.HandlerFunc) fiber.Handler
HTTPHandlerFunc wraps net/http handler func to fiber handler
func HTTPHandlerWithContext ¶
HTTPHandlerWithContext is like HTTPHandler, but additionally stores Fiber’s user context in the request context
func HTTPMiddleware ¶
HTTPMiddleware wraps net/http middleware to fiber middleware
Types ¶
This section is empty.