Documentation
¶
Index ¶
- func APIKeyTransport(apiKey string, old http.RoundTripper) http.RoundTripper
- func BasicAuthTransport(username, password string, old http.RoundTripper) http.RoundTripper
- func DefaultLogTransport(log *zap.Logger, old http.RoundTripper) http.RoundTripper
- func HeaderTransport(key, value string, old http.RoundTripper) http.RoundTripper
- func LogTransport(old http.RoundTripper) http.RoundTripper
- func TraceIDTransport(old http.RoundTripper) http.RoundTripper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIKeyTransport ¶
func APIKeyTransport(apiKey string, old http.RoundTripper) http.RoundTripper
APIKeyTransport is an http.RoundTripper that will add basic authentication headers to all requests.
func BasicAuthTransport ¶
func BasicAuthTransport(username, password string, old http.RoundTripper) http.RoundTripper
BasicAuthTransport is an http.RoundTripper that will add basic authentication headers to all requests.
func DefaultLogTransport ¶
func DefaultLogTransport(log *zap.Logger, old http.RoundTripper) http.RoundTripper
DefaultLogTransport will add the given logger to all request contexts.
func HeaderTransport ¶
func HeaderTransport(key, value string, old http.RoundTripper) http.RoundTripper
HeaderTransport is an http.RoundTripper that will add a header to all requests.
func LogTransport ¶
func LogTransport(old http.RoundTripper) http.RoundTripper
LogTransport will log every outgoing request.
func TraceIDTransport ¶
func TraceIDTransport(old http.RoundTripper) http.RoundTripper
TraceIDTransport ensures a trace id header is set on all outgoing requests.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.