{"modulePath":"github.com/captaincodeman/echo","version":"v0.0.16","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package middleware\n\n## Constants\n\n```go\nconst (\n\tBasic = \"Basic\"\n)\n```\n\n## Functions\n\n```go\nfunc BasicAuth(fn AuthFunc) echo.HandlerFunc\n```\nFor invalid Authorization header it sends \"404 - Bad Request\" response. For invalid credentials, it sends \"401 - Unauthorized\" response.\n\n```go\nfunc Gzip() echo.MiddlewareFunc\n```\nGzip returns a middleware which compresses HTTP response using gzip compression scheme.\n\n```go\nfunc Logger() echo.MiddlewareFunc\n```\n\n```go\nfunc Recover() echo.MiddlewareFunc\n```\nRecover returns a middleware which recovers from panics anywhere in the chain and handles the control to centralized HTTPErrorHandler.\n\n```go\nfunc RedirectToSlash(opts ...RedirectToSlashOptions) echo.HandlerFunc\n```\nRedirectToSlash returns a middleware which redirects requests without trailing slash path to trailing slash path.\n\n```go\nfunc StripTrailingSlash() echo.HandlerFunc\n```\nStripTrailingSlash returns a middleware which removes trailing slash from request path.\n\n## Types\n\n```go\ntype AuthFunc func(string, string) bool\n```\n\n```go\ntype RedirectToSlashOptions struct {\n\tCode int\n}\n```\n\n","path":"github.com/captaincodeman/echo/middleware","name":"middleware","synopsis":"","isRedistributable":true}
