Documentation ¶
Index ¶
- func ParseBody(c *fiber.Ctx, v validation.Validator, i i18np.I18n, d interface{})
- func ParseParams(c *fiber.Ctx, v validation.Validator, i i18np.I18n, d interface{})
- func ParseQuery(c *fiber.Ctx, v validation.Validator, i i18np.I18n, d interface{})
- func RunServer(cfg Config) error
- func RunServerOnAddr(addr string, cfg Config) error
- type Config
- type ErrorHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseBody ¶
func ParseBody(c *fiber.Ctx, v validation.Validator, i i18np.I18n, d interface{})
ParseBody parses the request body into the given struct and validates it.
func ParseParams ¶
func ParseParams(c *fiber.Ctx, v validation.Validator, i i18np.I18n, d interface{})
ParseParams parses the request params into the given struct and validates it.
func ParseQuery ¶
func ParseQuery(c *fiber.Ctx, v validation.Validator, i i18np.I18n, d interface{})
ParseQuery parses the request query into the given struct and validates it.
func RunServer ¶
RunServer runs a server with the given configuration. It returns an error if the server fails to start. If the logger is nil, it will use the default logger.
func RunServerOnAddr ¶
Types ¶
type ErrorHandler ¶
func NewErrorHandler ¶
func NewErrorHandler(logger log.Service, translator *i18np.I18n) ErrorHandler
Click to show internal directories.
Click to hide internal directories.