Versions in this module Expand all Collapse all v0 v0.1.0 Sep 18, 2023 Changes in this version + var DefaultHTTPClientConfig = HTTPClientConfig + var TLSVersions = map[string]TLSVersion + func JoinDir(dir, path string) string + func NewAuthorizationCredentialsFileRoundTripper(authType, authCredentialsFile string, rt http.RoundTripper) http.RoundTripper + func NewAuthorizationCredentialsRoundTripper(authType string, authCredentials Secret, rt http.RoundTripper) http.RoundTripper + func NewBasicAuthRoundTripper(username string, password Secret, passwordFile string, rt http.RoundTripper) http.RoundTripper + func NewOAuth2RoundTripper(config *OAuth2, next http.RoundTripper, opts *httpClientOptions) http.RoundTripper + func NewTLSConfig(cfg *TLSConfig) (*tls.Config, error) + func NewTLSRoundTripper(cfg *tls.Config, caFile, certFile, keyFile string, ...) (http.RoundTripper, error) + func NewUserAgentRoundTripper(userAgent string, rt http.RoundTripper) http.RoundTripper + type Authorization struct + Credentials Secret + CredentialsFile string + Type string + func (a *Authorization) SetDirectory(dir string) + type BasicAuth struct + Password Secret + PasswordFile string + Username string + func (a *BasicAuth) SetDirectory(dir string) + func (a *BasicAuth) UnmarshalYAML(unmarshal func(interface{}) error) error + type DialContextFunc func(context.Context, string, string) (net.Conn, error) + type DirectorySetter interface + SetDirectory func(dir string) + type HTTPClientConfig struct + Authorization *Authorization + BasicAuth *BasicAuth + BearerToken Secret + BearerTokenFile string + EnableHTTP2 bool + FollowRedirects bool + OAuth2 *OAuth2 + ProxyConnectHeader Header + ProxyURL URL + TLSConfig TLSConfig + func LoadHTTPConfig(s string) (*HTTPClientConfig, error) + func LoadHTTPConfigFile(filename string) (*HTTPClientConfig, []byte, error) + func (c *HTTPClientConfig) SetDirectory(dir string) + func (c *HTTPClientConfig) UnmarshalJSON(data []byte) error + func (c *HTTPClientConfig) UnmarshalYAML(unmarshal func(interface{}) error) error + func (c *HTTPClientConfig) Validate() error + func (c HTTPClientConfig) String() string + type HTTPClientOption func(options *httpClientOptions) + func WithDialContextFunc(fn DialContextFunc) HTTPClientOption + func WithHTTP2Disabled() HTTPClientOption + func WithIdleConnTimeout(timeout time.Duration) HTTPClientOption + func WithKeepAlivesDisabled() HTTPClientOption + func WithUserAgent(ua string) HTTPClientOption + type Header map[string][]Secret + func (h *Header) HTTPHeader() http.Header + type OAuth2 struct + ClientID string + ClientSecret Secret + ClientSecretFile string + EndpointParams map[string]string + ProxyURL URL + Scopes []string + TLSConfig TLSConfig + TokenURL string + func (a *OAuth2) SetDirectory(dir string) + type Secret string + func (s *Secret) UnmarshalYAML(unmarshal func(interface{}) error) error + func (s Secret) MarshalJSON() ([]byte, error) + func (s Secret) MarshalYAML() (interface{}, error) + type TLSConfig struct + CAFile string + CertFile string + InsecureSkipVerify bool + KeyFile string + MaxVersion TLSVersion + MinVersion TLSVersion + ServerName string + func (c *TLSConfig) SetDirectory(dir string) + func (c *TLSConfig) UnmarshalYAML(unmarshal func(interface{}) error) error + type TLSVersion uint16 + func (tv *TLSVersion) MarshalJSON() ([]byte, error) + func (tv *TLSVersion) MarshalYAML() (interface{}, error) + func (tv *TLSVersion) String() string + func (tv *TLSVersion) UnmarshalJSON(data []byte) error + func (tv *TLSVersion) UnmarshalYAML(unmarshal func(interface{}) error) error + type URL struct + func (u *URL) UnmarshalJSON(data []byte) error + func (u *URL) UnmarshalYAML(unmarshal func(interface{}) error) error + func (u URL) MarshalJSON() ([]byte, error) + func (u URL) MarshalYAML() (interface{}, error) + func (u URL) Redacted() string