Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandler ¶
ErrorHandler is used to catch error thrown inside the routes by ctx.Next(err)
func ParseBody ¶
func ParseBody(ctx *fiber.Ctx, body interface{}) *fiber.Error
ParseBody is helper function for parsing the body. Is any error occurs it will panic. Its just a helper function to avoid writing if condition again n again.
func ParseBodyAndValidate ¶
func ParseBodyAndValidate(ctx *fiber.Ctx, body interface{}) *fiber.Error
ParseBodyAndValidate is helper function for parsing the body. Is any error occurs it will panic. Its just a helper function to avoid writing if condition again n again.
Types ¶
type HTTPError ¶
type HTTPError struct { Status string `json:"status" example:"error"` // The status error of string. Error string `json:"error" example:"a message error"` // The message error description of string. }
HTTPError defines the field which should be the response.
type HTTPSuccess ¶
type HTTPSuccess struct { Status string `json:"status" example:"success"` // The status success of string. Data interface{} `json:"data"` // The result of json. }
HTTPSuccess defines the field which should be the response.
Click to show internal directories.
Click to hide internal directories.