Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultJsonErrorHandlerConfig = JsonErrorHandlerConfig{ Err: errors.New("opps, an error occured"), HTTPCode: int(std.StatusServerError), }
DefaultJsonErrorHandlerConfig is the default config
Functions ¶
This section is empty.
Types ¶
type JsonErrorHandlerConfig ¶
type JsonErrorHandlerConfig struct { // Err a error Err error // HTTPCode define http status code sended to response HTTPCode int }
JsonErrorHandlerConfig defines the config for Json Error Handler helper
func (JsonErrorHandlerConfig) JsonErrorHandler ¶
func (cfg JsonErrorHandlerConfig) JsonErrorHandler(err error, c echo.Context)
JsonErrorHandler return Json Error Handler helper. If config not given, will use the default
Click to show internal directories.
Click to hide internal directories.