Documentation ¶
Index ¶
- Variables
- func CORS() echo.MiddlewareFunc
- func ErrorHandler(err error, ctx echo.Context)
- func Limiter() echo.MiddlewareFunc
- func Logger() echo.MiddlewareFunc
- func Recover() echo.MiddlewareFunc
- func RecoverHandle(ctx echo.Context)
- func RemoveTrailingSlash() echo.MiddlewareFunc
- func RequestID() echo.MiddlewareFunc
- func RequestIDFromCtx(ctx echo.Context) string
Constants ¶
This section is empty.
Variables ¶
View Source
var AllowHeaders = []string{
echo.HeaderContentType,
echo.HeaderAccessControlAllowHeaders,
echo.HeaderAccessControlExposeHeaders,
echo.HeaderAuthorization,
echo.HeaderXRequestedWith,
echo.HeaderXRequestID,
}
AllowHeaders CORS headers Access-Control-Allow-Methods
View Source
var AllowSkipLimiter = []string{"127.0.0.1", "localhost"}
AllowSkipLimiter set ip/domain for skip limiter handle
View Source
var ExposeHeaders = []string{
echo.HeaderContentLength,
echo.HeaderLastModified,
echo.HeaderContentType,
echo.HeaderAccessControlAllowHeaders,
echo.HeaderAccessControlExposeHeaders,
echo.HeaderAuthorization,
echo.HeaderXRequestedWith,
echo.HeaderXRequestID,
}
ExposeHeaders CORS headers Access-Control-Expose-Headers
Functions ¶
func ErrorHandler ¶
func ErrorHandler(err error, ctx echo.Context)
ErrorHandler for echo error handler
func RecoverHandle ¶
func RecoverHandle(ctx echo.Context)
RecoverHandle recover all panic and print error log
func RemoveTrailingSlash ¶
func RemoveTrailingSlash() echo.MiddlewareFunc
RemoveTrailingSlash uses echo middleware.RemoveTrailingSlash
func RequestID ¶
func RequestID() echo.MiddlewareFunc
RequestID request id settings for echo handler
func RequestIDFromCtx ¶
func RequestIDFromCtx(ctx echo.Context) string
RequestIDFromCtx get request id from current echo.Context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.