helpers

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorHandler

func ErrorHandler(c *fiber.Ctx, err error, logger *zerolog.Logger, isProduction bool) error

ErrorHandler custom handler to log recovered errors using our logger and return json instead of string

func GetLogger

func GetLogger(c *fiber.Ctx, d *zerolog.Logger) *zerolog.Logger

func GetUserID

func GetUserID(c *fiber.Ctx) string

Types

type ErrorRes

type ErrorRes struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL