Documentation
¶
Overview ¶
Package config contains common configuration values that are used by the various commands and subcommands in the CLI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPClientForProxy ¶ added in v0.0.76
func HTTPClientForProxy(proxyConfig ProxyConfig) (*awshttp.BuildableClient, error)
HTTPClientForProxy creates an AWS buildable HTTP client configured for HTTP(S) or SOCKS5 proxies. If both proxy types are set, SOCKS5 takes precedence.
func InitializeLogging ¶
InitializeLogging initializes the logging configuration for the CLI. It sets the log level based on the verbose and quiet flags provided by the user. If the quiet flag is set, the logger is set to discard all logs. If the verbose flag is set, the log level is set to debug. Otherwise, the log level is set to info. The logger is then returned for use by caller. We are using Palantir's Witchcraft logging library to structure our logging output.
func SetProxyConfig ¶ added in v0.0.76
func SetProxyConfig(ctx context.Context, proxyConfig ProxyConfig) context.Context
SetProxyConfig stores proxy settings on the command context for paths that create their own AWS config later in execution.
Types ¶
type AWSLoadOption ¶ added in v0.0.76
type AWSLoadOption = func(*awsconfig.LoadOptions) error
func AWSLoadOptionsForProxy ¶ added in v0.0.76
func AWSLoadOptionsForProxy(proxyConfig ProxyConfig) ([]AWSLoadOption, error)
AWSLoadOptionsForProxy returns AWS SDK config load options for proxy settings.
func AWSLoadOptionsFromContext ¶ added in v0.0.76
func AWSLoadOptionsFromContext(ctx context.Context) ([]AWSLoadOption, error)
AWSLoadOptionsFromContext returns AWS SDK config load options from context.
type ProxyConfig ¶ added in v0.0.76
ProxyConfig captures global proxy settings for AWS SDK HTTP traffic.
func ProxyConfigFromContext ¶ added in v0.0.76
func ProxyConfigFromContext(ctx context.Context) ProxyConfig
ProxyConfigFromContext returns proxy settings from context, if present.