Documentation ¶
Index ¶
- Constants
- Variables
- func HookGateLogger() echo.MiddlewareFunc
- func HookGateLoggerWithConfig(config GateLoggerConfig) echo.MiddlewareFunc
- func Myskipper(context echo.Context) bool
- func Recover() echo.MiddlewareFunc
- func RecoverWithConfig(config RecoverConfig) echo.MiddlewareFunc
- func RegisterGlobalMiddlewares(e *echo.Echo, f GetStatusCodeFunc)
- func Shutdown(instance *echo.Echo, timeout time.Duration)
- type GateLoggerConfig
- type GetStatusCodeFunc
- type RecoverConfig
- type Response
- type Skipper
Constants ¶
View Source
const UNKNOWN_STATUS_CODE = 500
Variables ¶
View Source
var DefaultConfig = GateLoggerConfig{ IncludeRequestBodies: false, IncludeResponseBodies: false, Skipper: middleware.DefaultSkipper, }
View Source
var DefaultRecoverConfig = RecoverConfig{ Skipper: middleware.DefaultSkipper, StackSize: 4 << 10, DisableStackAll: false, DisablePrintStack: false, LogLevel: echoLog.INFO, // contains filtered or unexported fields }
View Source
var UndefinedError = errors.DefineError("Middleware", 14, "UndefinedError: %s")
Functions ¶
func HookGateLogger ¶
func HookGateLogger() echo.MiddlewareFunc
func HookGateLoggerWithConfig ¶
func HookGateLoggerWithConfig(config GateLoggerConfig) echo.MiddlewareFunc
func RecoverWithConfig ¶
func RecoverWithConfig(config RecoverConfig) echo.MiddlewareFunc
func RegisterGlobalMiddlewares ¶
func RegisterGlobalMiddlewares(e *echo.Echo, f GetStatusCodeFunc)
Types ¶
type GateLoggerConfig ¶
type GetStatusCodeFunc ¶
type GetStatusCodeFunc func() errors.StatusCodeList
type RecoverConfig ¶
Directories ¶
Path | Synopsis |
---|---|
Package health check provides to add echo instance.
|
Package health check provides to add echo instance. |
Click to show internal directories.
Click to hide internal directories.