Documentation
¶
Index ¶
- func BasicAuth(username, password string) string
- func CheckReadiness(url string, apiUser string, apiPass string) echo.MiddlewareFunc
- func Proxy(config ProxyConfig) echo.MiddlewareFunc
- func RequestIdAndDetailsIssuer(next echo.HandlerFunc) echo.HandlerFunc
- func ResponseBodyDump() echo.MiddlewareFunc
- func TracingMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- func Zerologger(skipRules []logfilter.SkipRule) echo.MiddlewareFunc
- type CustomRoundTripper
- type ProxyConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckReadiness ¶
func CheckReadiness(url string, apiUser string, apiPass string) echo.MiddlewareFunc
func Proxy ¶ added in v0.11.10
func Proxy(config ProxyConfig) echo.MiddlewareFunc
Proxy returns a proxy middleware that forwards the request to the target server.
func RequestIdAndDetailsIssuer ¶
func RequestIdAndDetailsIssuer(next echo.HandlerFunc) echo.HandlerFunc
func ResponseBodyDump ¶
func ResponseBodyDump() echo.MiddlewareFunc
func TracingMiddleware ¶
func TracingMiddleware(next echo.HandlerFunc) echo.HandlerFunc
Define Tracing middleware
func Zerologger ¶
func Zerologger(skipRules []logfilter.SkipRule) echo.MiddlewareFunc
Types ¶
type CustomRoundTripper ¶ added in v0.11.10
type CustomRoundTripper struct {
Transport http.RoundTripper
BasicAuthStr string
}
CustomRoundTripper is a custom implementation of http.RoundTripper to modify request headers.
type ProxyConfig ¶ added in v0.11.10
type ProxyConfig struct {
URL *url.URL
SkipPatterns [][]string
// Rewrite defines URL path rewrite rules. The values captured in asterisk can be
// retrieved by index e.g. $1, $2 and so on.
// Examples:
// "/old": "/new",
// "/api/*": "/$1",
// "/js/*": "/public/javascripts/$1",
// "/users/*/orders/*": "/user/$1/order/$2",
Rewrite map[string]string
// RegexRewrite defines rewrite rules using regexp.Rexexp with captures
// Every capture group in the values can be retrieved by index e.g. $1, $2 and so on.
// Example:
// "^/old/[0.9]+/": "/new",
// "^/api/.+?/(.*)": "/v2/$1",
RegexRewrite map[*regexp.Regexp]string
ModifyResponse func(res *http.Response) error
Username string
Password string
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.