Skip to content

Commit

Permalink
Document new query string parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
stanhu committed Sep 11, 2024
1 parent f71c3c4 commit 86e27a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ func (co ConfigOverrider) ClientConfig(serviceName string, cfgs ...*aws.Config)
// - endpoint: The endpoint URL (hostname only or fully qualified URI); sets aws.Config.Endpoint.
// - disableSSL: A value of "true" disables SSL when sending requests; sets aws.Config.DisableSSL.
// - 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 ConfigFromURLParams(q url.Values) (*aws.Config, error) {
var cfg aws.Config
cfg := aws.Config{LogLevel: aws.LogLevel(aws.LogDebugWithHTTPBody)}

for param, values := range q {
value := values[0]
switch param {
Expand Down Expand Up @@ -195,6 +198,8 @@ func NewDefaultV2Config(ctx context.Context) (awsv2.Config, error) {
// - 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.
func V2ConfigFromURLParams(ctx context.Context, q url.Values) (awsv2.Config, error) {
var endpoint string
var hostnameImmutable bool
Expand Down
5 changes: 5 additions & 0 deletions blob/s3blob/s3blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ const Scheme = "s3"
// Use "awssdk=v1" to force using AWS SDK v1, "awssdk=v2" to force using AWS SDK v2,
// or anything else to accept the default.
//
// The following S3-specific query options are also supported:
// - ssetype: The type of server side encryption used (AES256, aws:kms, aws:kms:dsse)
// - kmskeyid: The KMS key ID for server side encryption
// - accelerate: A value of "true" uses the S3 Transfer Accleration endpoints
//
// For V1, see gocloud.dev/aws/ConfigFromURLParams for supported query parameters
// for overriding the aws.Session from the URL.
// For V2, see gocloud.dev/aws/V2ConfigFromURLParams.
Expand Down

0 comments on commit 86e27a0

Please # to comment.