Documentation ¶
Index ¶
- func KeyAuthErrorHandler(err error, _ echo.Context) error
- func LoggerMid() echo.MiddlewareFunc
- func LoggerSkipper(c echo.Context) bool
- func NewErrorHandler(logger *zap.Logger) echo.HTTPErrorHandler
- func ZapLogger(log *zap.Logger) echo.MiddlewareFunc
- func ZapLoggerWithSkipper(log *zap.Logger, skipper Skipper) echo.MiddlewareFunc
- type Paginator
- type SkipRule
- type Skipper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyAuthErrorHandler ¶
KeyAuthErrorHandler is custom error handler for echo KeyAuth middleware. If this is not set, it's will convert all validator error to 401 error
func LoggerMid ¶
func LoggerMid() echo.MiddlewareFunc
LoggerMid skip /status endpoint, will be deprecated.
func LoggerSkipper ¶
func LoggerSkipper(c echo.Context) bool
LoggerSkipper skip the heartbeat /status log
func NewErrorHandler ¶
NewErrorHandler return a customize echo's HTTP error handler.
func ZapLoggerWithSkipper ¶
ZapLoggerWithSkipper use zap as request logger thank https://github.com/brpaz/echozap
Types ¶
type Paginator ¶
type Paginator struct { Page int `query:"page" validate:"omitempty,min=1"` PageSize int `query:"page_size" validate:"omitempty,min=5,max=50"` }
Paginator can be embedded to request struct You can check the input by mod validator If the value is wrong, It would be change to default
Click to show internal directories.
Click to hide internal directories.