Documentation ¶
Index ¶
- func NoCache() echo.MiddlewareFunc
- func NoCacheWithConfig(config NoCacheConfig) echo.MiddlewareFunc
- func ZeroLogRequestLog() echo.MiddlewareFunc
- func ZeroLogRequestLogWithConfig(config ZeroLogRequestLogConfig) echo.MiddlewareFunc
- func ZeroLogWithConfig(cfg ZeroLogConfig) echo.MiddlewareFunc
- type NoCacheConfig
- type ZeroLogConfig
- type ZeroLogRequestLogConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoCache ¶ added in v1.4.0
func NoCache() echo.MiddlewareFunc
NoCache returns a middleware which sets the no cache headers with default configuration.
func NoCacheWithConfig ¶ added in v1.4.0
func NoCacheWithConfig(config NoCacheConfig) echo.MiddlewareFunc
NoCacheWithConfig returns a middleware which sets a number of http headers to ensure the resource is not cached.
As per http://wiki.nginx.org/HttpProxyModule - NoCache sets:
Expires: Thu, 01 Jan 1970 00:00:00 UTC Cache-Control: no-cache, private, max-age=0 X-Accel-Expires: 0 Pragma: no-cache (for HTTP/1.0 proxies/clients)
func ZeroLogRequestLog ¶ added in v1.1.0
func ZeroLogRequestLog() echo.MiddlewareFunc
ZeroLogRequestLog returns a request logger middleware with default config.
func ZeroLogRequestLogWithConfig ¶ added in v1.1.0
func ZeroLogRequestLogWithConfig(config ZeroLogRequestLogConfig) echo.MiddlewareFunc
ZeroLogRequestLogWithConfig returns a request logger middleware with config.
func ZeroLogWithConfig ¶
func ZeroLogWithConfig(cfg ZeroLogConfig) echo.MiddlewareFunc
ZeroLogWithConfig setup and return an echo middleware with zerolog logger available from the context.Context.
Types ¶
type NoCacheConfig ¶ added in v1.3.0
type NoCacheConfig struct { // Skipper defines a function to skip middleware. Skipper middleware.Skipper }
NoCacheConfig used to configure the no cache middleware
type ZeroLogConfig ¶
type ZeroLogConfig struct { Caller bool Level zerolog.Level Output io.Writer Logger zerolog.Logger Fields map[string]interface{} }
ZeroLogConfig used to configure the zerolog echo middleware
type ZeroLogRequestLogConfig ¶ added in v1.1.0
type ZeroLogRequestLogConfig struct { // Skipper defines a function to skip middleware. Skipper middleware.Skipper }
ZeroLogRequestLogConfig defines the config for the request logger middleware