package aws
import "gocloud.dev/aws"
Package aws provides fundamental Wire providers for Amazon Web Services (AWS).
Index ¶
- Variables
- func ConfigCredentials(cfg *aws.Config) *credentials.Credentials
- func ConfigFromURLParams(q url.Values) (*aws.Config, error)
- func NewDefaultSession() (*session.Session, error)
- func NewDefaultV2Config(ctx context.Context) (awsv2.Config, error)
- func NewSessionFromURLParams(q url.Values) (*session.Session, url.Values, error)
- func SessionConfig(sess *session.Session) *aws.Config
- func UseV2(q url.Values) bool
- func V2ConfigFromURLParams(ctx context.Context, q url.Values) (awsv2.Config, error)
- type ConfigOverrider
Variables ¶
var DefaultSession = wire.NewSet( SessionConfig, ConfigCredentials, NewDefaultSession, wire.Bind(new(client.ConfigProvider), new(*session.Session)), )
DefaultSession is a Wire provider set that provides a *session.Session using the default options.
Functions ¶
func ConfigCredentials ¶
func ConfigCredentials(cfg *aws.Config) *credentials.Credentials
ConfigCredentials returns cfg.Credentials.
func ConfigFromURLParams ¶
ConfigFromURLParams returns an aws.Config initialized based on the URL parameters in q. It is intended to be used by URLOpeners for AWS services. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
It returns an error if q contains any unknown query parameters; callers should remove any query parameters they know about from q before calling ConfigFromURLParams.
The following query options are supported:
- region: The AWS region for requests; sets aws.Config.Region.
- endpoint: The endpoint URL (hostname only or fully qualified URI); sets aws.Config.Endpoint.
- disable_ssl (or disableSSL): A value of "true" disables SSL when sending requests; sets aws.Config.DisableSSL.
- s3_force_path_style (or s3ForcePathStyle): A value of "true" forces the request to use path-style addressing; sets aws.Config.S3ForcePathStyle.
- dualstack: A value of "true" enables dual stack (IPv4 and IPv6) endpoints
- fips: A value of "true" enables the use of FIPS endpoints
func NewDefaultSession ¶
NewDefaultSession returns a *session.Session using the default options.
func NewDefaultV2Config ¶
NewDefaultV2Config returns a aws.Config for AWS SDK v2, using the default options.
func NewSessionFromURLParams ¶
NewSessionFromURLParams returns an session.Session with session.Options initialized based on the URL parameters in q. It is intended to be used by URLOpeners for AWS services. https://docs.aws.amazon.com/sdk-for-go/api/aws/session/#Session
It should be used before ConfigFromURLParams as it strips the query parameters it knows about
The following query options are supported:
- profile: The AWS profile to use from the AWS configs (shared config file and shared credentials file)
func SessionConfig ¶
SessionConfig returns sess.Config.
func UseV2 ¶
UseV2 returns true iff the URL parameters indicate that the provider should use the AWS SDK v2.
"awssdk=v1" will force V1. "awssdk=v2" will force V2. No "awssdk" parameter (or any other value) will return the default, currently V2.
func V2ConfigFromURLParams ¶
V2ConfigFromURLParams returns an aws.Config for AWS SDK v2 initialized based on the URL parameters in q. It is intended to be used by URLOpeners for AWS services if UseV2 returns true.
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Config
It returns an error if q contains any unknown query parameters; callers should remove any query parameters they know about from q before calling V2ConfigFromURLParams.
The following query options are supported:
- region: The AWS region for requests; sets WithRegion.
- anonymous: A value of "true" forces use of anonymous credentials.
- profile: The shared config profile to use; sets SharedConfigProfile.
- endpoint: The AWS service endpoint to send HTTP request.
- hostname_immutable: Make the hostname immutable, only works if endpoint is also set.
- dualstack: A value of "true" enables dual stack (IPv4 and IPv6) endpoints.
- fips: A value of "true" enables the use of FIPS endpoints.
- rate_limiter_capacity: A integer value configures the capacity of a token bucket used in client-side rate limits. If no value is set, the client-side rate limiting is disabled. See https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/retries-timeouts/#client-side-rate-limiting.
Types ¶
type ConfigOverrider ¶
type ConfigOverrider struct { Base client.ConfigProvider Configs []*aws.Config }
ConfigOverrider implements client.ConfigProvider by overlaying a list of configurations over a base configuration provider.
func (ConfigOverrider) ClientConfig ¶
ClientConfig calls the base provider's ClientConfig method with co.Configs followed by the arguments given to ClientConfig.
Source Files ¶
aws.go
Directories ¶
Path | Synopsis |
---|---|
aws/awscloud | Package awscloud contains Wire providers for AWS services. |
aws/rds | Package rds contains Wire providers that are common across RDS. |
- Version
- v0.41.0 (latest)
- Published
- Mar 30, 2025
- Platform
- js/wasm
- Imports
- 14 packages
- Last checked
- 1 hour ago –
Tools for package owners.