Versions in this module Expand all Collapse all v4 v4.2.3 Apr 22, 2021 Changes in this version + const AlgorithmHS256 + const GZIPEncoding + const StatusCodeContextCanceled + var DefaultBasicAuthConfig = BasicAuthConfig + var DefaultBodyDumpConfig = BodyDumpConfig + var DefaultBodyLimitConfig = BodyLimitConfig + var DefaultCORSConfig = CORSConfig + var DefaultCSRFConfig = CSRFConfig + var DefaultDecompressConfig = DecompressConfig + var DefaultGzipConfig = GzipConfig + var DefaultJWTConfig = JWTConfig + var DefaultKeyAuthConfig = KeyAuthConfig + var DefaultLoggerConfig = LoggerConfig + var DefaultMethodOverrideConfig = MethodOverrideConfig + var DefaultProxyConfig = ProxyConfig + var DefaultRateLimiterConfig = RateLimiterConfig + var DefaultRateLimiterMemoryStoreConfig = RateLimiterMemoryStoreConfig + var DefaultRecoverConfig = RecoverConfig + var DefaultRedirectConfig = RedirectConfig + var DefaultRequestIDConfig = RequestIDConfig + var DefaultRewriteConfig = RewriteConfig + var DefaultSecureConfig = SecureConfig + var DefaultStaticConfig = StaticConfig + var DefaultTimeoutConfig = TimeoutConfig + var DefaultTrailingSlashConfig = TrailingSlashConfig + var ErrExtractorError = echo.NewHTTPError(http.StatusForbidden, "error while extracting identifier") + var ErrJWTInvalid = echo.NewHTTPError(http.StatusUnauthorized, "invalid or expired jwt") + var ErrJWTMissing = echo.NewHTTPError(http.StatusBadRequest, "missing or malformed jwt") + var ErrRateLimitExceeded = echo.NewHTTPError(http.StatusTooManyRequests, "rate limit exceeded") + func AddTrailingSlash() echo.MiddlewareFunc + func AddTrailingSlashWithConfig(config TrailingSlashConfig) echo.MiddlewareFunc + func BasicAuth(fn BasicAuthValidator) echo.MiddlewareFunc + func BasicAuthWithConfig(config BasicAuthConfig) echo.MiddlewareFunc + func BodyDump(handler BodyDumpHandler) echo.MiddlewareFunc + func BodyDumpWithConfig(config BodyDumpConfig) echo.MiddlewareFunc + func BodyLimit(limit string) echo.MiddlewareFunc + func BodyLimitWithConfig(config BodyLimitConfig) echo.MiddlewareFunc + func CORS() echo.MiddlewareFunc + func CORSWithConfig(config CORSConfig) echo.MiddlewareFunc + func CSRF() echo.MiddlewareFunc + func CSRFWithConfig(config CSRFConfig) echo.MiddlewareFunc + func Decompress() echo.MiddlewareFunc + func DecompressWithConfig(config DecompressConfig) echo.MiddlewareFunc + func DefaultSkipper(echo.Context) bool + func Gzip() echo.MiddlewareFunc + func GzipWithConfig(config GzipConfig) echo.MiddlewareFunc + func HTTPSNonWWWRedirect() echo.MiddlewareFunc + func HTTPSNonWWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc + func HTTPSRedirect() echo.MiddlewareFunc + func HTTPSRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc + func HTTPSWWWRedirect() echo.MiddlewareFunc + func HTTPSWWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc + func JWT(key interface{}) echo.MiddlewareFunc + func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc + func KeyAuth(fn KeyAuthValidator) echo.MiddlewareFunc + func KeyAuthWithConfig(config KeyAuthConfig) echo.MiddlewareFunc + func Logger() echo.MiddlewareFunc + func LoggerWithConfig(config LoggerConfig) echo.MiddlewareFunc + func MethodOverride() echo.MiddlewareFunc + func MethodOverrideWithConfig(config MethodOverrideConfig) echo.MiddlewareFunc + func NonWWWRedirect() echo.MiddlewareFunc + func NonWWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc + func Proxy(balancer ProxyBalancer) echo.MiddlewareFunc + func ProxyWithConfig(config ProxyConfig) echo.MiddlewareFunc + func RateLimiter(store RateLimiterStore) echo.MiddlewareFunc + func RateLimiterWithConfig(config RateLimiterConfig) echo.MiddlewareFunc + func Recover() echo.MiddlewareFunc + func RecoverWithConfig(config RecoverConfig) echo.MiddlewareFunc + func RemoveTrailingSlash() echo.MiddlewareFunc + func RemoveTrailingSlashWithConfig(config TrailingSlashConfig) echo.MiddlewareFunc + func RequestID() echo.MiddlewareFunc + func RequestIDWithConfig(config RequestIDConfig) echo.MiddlewareFunc + func Rewrite(rules map[string]string) echo.MiddlewareFunc + func RewriteWithConfig(config RewriteConfig) echo.MiddlewareFunc + func Secure() echo.MiddlewareFunc + func SecureWithConfig(config SecureConfig) echo.MiddlewareFunc + func Static(root string) echo.MiddlewareFunc + func StaticWithConfig(config StaticConfig) echo.MiddlewareFunc + func Timeout() echo.MiddlewareFunc + func TimeoutWithConfig(config TimeoutConfig) echo.MiddlewareFunc + func WWWRedirect() echo.MiddlewareFunc + func WWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc + type BasicAuthConfig struct + Realm string + Skipper Skipper + Validator BasicAuthValidator + type BasicAuthValidator func(string, string, echo.Context) (bool, error) + type BeforeFunc func(echo.Context) + type BodyDumpConfig struct + Handler BodyDumpHandler + Skipper Skipper + type BodyDumpHandler func(echo.Context, []byte, []byte) + type BodyLimitConfig struct + Limit string + Skipper Skipper + type CORSConfig struct + AllowCredentials bool + AllowHeaders []string + AllowMethods []string + AllowOriginFunc func(origin string) (bool, error) + AllowOrigins []string + ExposeHeaders []string + MaxAge int + Skipper Skipper + type CSRFConfig struct + ContextKey string + CookieDomain string + CookieHTTPOnly bool + CookieMaxAge int + CookieName string + CookiePath string + CookieSameSite http.SameSite + CookieSecure bool + Skipper Skipper + TokenLength uint8 + TokenLookup string + type DecompressConfig struct + GzipDecompressPool Decompressor + Skipper Skipper + type Decompressor interface + type DefaultGzipDecompressPool struct + type Extractor func(context echo.Context) (string, error) + type GzipConfig struct + Level int + Skipper Skipper + type JWTConfig struct + AuthScheme string + BeforeFunc BeforeFunc + Claims jwt.Claims + ContextKey string + ErrorHandler JWTErrorHandler + ErrorHandlerWithContext JWTErrorHandlerWithContext + SigningKey interface{} + SigningKeys map[string]interface{} + SigningMethod string + Skipper Skipper + SuccessHandler JWTSuccessHandler + TokenLookup string + type JWTErrorHandler func(error) error + type JWTErrorHandlerWithContext func(error, echo.Context) error + type JWTSuccessHandler func(echo.Context) + type KeyAuthConfig struct + AuthScheme string + KeyLookup string + Skipper Skipper + Validator KeyAuthValidator + type KeyAuthValidator func(string, echo.Context) (bool, error) + type LoggerConfig struct + CustomTimeFormat string + Format string + Output io.Writer + Skipper Skipper + type MethodOverrideConfig struct + Getter MethodOverrideGetter + Skipper Skipper + type MethodOverrideGetter func(echo.Context) string + func MethodFromForm(param string) MethodOverrideGetter + func MethodFromHeader(header string) MethodOverrideGetter + func MethodFromQuery(param string) MethodOverrideGetter + type ProxyBalancer interface + AddTarget func(*ProxyTarget) bool + Next func(echo.Context) *ProxyTarget + RemoveTarget func(string) bool + func NewRandomBalancer(targets []*ProxyTarget) ProxyBalancer + func NewRoundRobinBalancer(targets []*ProxyTarget) ProxyBalancer + type ProxyConfig struct + Balancer ProxyBalancer + ContextKey string + ModifyResponse func(*http.Response) error + RegexRewrite map[*regexp.Regexp]string + Rewrite map[string]string + Skipper Skipper + Transport http.RoundTripper + type ProxyTarget struct + Meta echo.Map + Name string + URL *url.URL + type RateLimiterConfig struct + BeforeFunc BeforeFunc + DenyHandler func(context echo.Context, identifier string, err error) error + ErrorHandler func(context echo.Context, err error) error + IdentifierExtractor Extractor + Skipper Skipper + Store RateLimiterStore + type RateLimiterMemoryStore struct + func NewRateLimiterMemoryStore(rate rate.Limit) (store *RateLimiterMemoryStore) + func NewRateLimiterMemoryStoreWithConfig(config RateLimiterMemoryStoreConfig) (store *RateLimiterMemoryStore) + func (store *RateLimiterMemoryStore) Allow(identifier string) (bool, error) + type RateLimiterMemoryStoreConfig struct + Burst int + ExpiresIn time.Duration + Rate rate.Limit + type RateLimiterStore interface + Allow func(identifier string) (bool, error) + type RecoverConfig struct + DisablePrintStack bool + DisableStackAll bool + LogLevel log.Lvl + Skipper Skipper + StackSize int + type RedirectConfig struct + Code int + type RequestIDConfig struct + Generator func() string + Skipper Skipper + type RewriteConfig struct + RegexRules map[*regexp.Regexp]string + Rules map[string]string + Skipper Skipper + type SecureConfig struct + CSPReportOnly bool + ContentSecurityPolicy string + ContentTypeNosniff string + HSTSExcludeSubdomains bool + HSTSMaxAge int + HSTSPreloadEnabled bool + ReferrerPolicy string + Skipper Skipper + XFrameOptions string + XSSProtection string + type Skipper func(echo.Context) bool + type StaticConfig struct + Browse bool + HTML5 bool + IgnoreBase bool + Index string + Root string + Skipper Skipper + type TimeoutConfig struct + ErrorMessage string + OnTimeoutRouteErrorHandler func(err error, c echo.Context) + Skipper Skipper + Timeout time.Duration + type TrailingSlashConfig struct + RedirectCode int + Skipper Skipper + type Visitor struct Other modules containing this package github.com/AndreasWolny/echo