build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.27.1 to 1.30.0 (#6578)

Bumps
[github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2)
from 1.27.1 to 1.30.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md">github.com/aws/aws-sdk-go-v2/service/s3's
changelog</a>.</em></p>
<blockquote>
<h1>Release (2023-01-10)</h1>
<h2>Module Highlights</h2>
<ul>
<li><code>github.com/aws/aws-sdk-go-v2/service/location</code>: <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/location/CHANGELOG.md#v1210-2023-01-10">v1.21.0</a>
<ul>
<li><strong>Feature</strong>: This release adds support for two new
route travel models, Bicycle and Motorcycle which can be used with Grab
data source.</li>
</ul>
</li>
<li><code>github.com/aws/aws-sdk-go-v2/service/rds</code>: <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/rds/CHANGELOG.md#v1400-2023-01-10">v1.40.0</a>
<ul>
<li><strong>Feature</strong>: This release adds support for configuring
allocated storage on the CreateDBInstanceReadReplica,
RestoreDBInstanceFromDBSnapshot, and RestoreDBInstanceToPointInTime
APIs.</li>
</ul>
</li>
</ul>
<h1>Release (2023-01-09)</h1>
<h2>Module Highlights</h2>
<ul>
<li><code>github.com/aws/aws-sdk-go-v2/service/ecrpublic</code>: <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/ecrpublic/CHANGELOG.md#v1150-2023-01-09">v1.15.0</a>
<ul>
<li><strong>Feature</strong>: This release for Amazon ECR Public makes
several change to bring the SDK into sync with the API.</li>
</ul>
</li>
<li><code>github.com/aws/aws-sdk-go-v2/service/kendraranking</code>: <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/kendraranking/CHANGELOG.md#v100-2023-01-09">v1.0.0</a>
<ul>
<li><strong>Release</strong>: New AWS service client module</li>
<li><strong>Feature</strong>: Introducing Amazon Kendra Intelligent
Ranking, a new set of Kendra APIs that leverages Kendra semantic ranking
capabilities to improve the quality of search results from other search
services (i.e. OpenSearch, ElasticSearch, Solr).</li>
</ul>
</li>
<li><code>github.com/aws/aws-sdk-go-v2/service/networkfirewall</code>:
<a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/networkfirewall/CHANGELOG.md#v1230-2023-01-09">v1.23.0</a>
<ul>
<li><strong>Feature</strong>: Network Firewall now supports the Suricata
rule action reject, in addition to the actions pass, drop, and
alert.</li>
</ul>
</li>
<li><code>github.com/aws/aws-sdk-go-v2/service/workspacesweb</code>: <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/workspacesweb/CHANGELOG.md#v190-2023-01-09">v1.9.0</a>
<ul>
<li><strong>Feature</strong>: This release adds support for a new portal
authentication type: AWS IAM Identity Center (successor to AWS Single
Sign-On).</li>
</ul>
</li>
</ul>
<h1>Release (2023-01-06)</h1>
<h2>Module Highlights</h2>
<ul>
<li><code>github.com/aws/aws-sdk-go-v2/service/acmpca</code>: <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/acmpca/CHANGELOG.md#v1210-2023-01-06">v1.21.0</a>
<ul>
<li><strong>Feature</strong>: Added revocation parameter validation:
bucket names must match S3 bucket naming rules and CNAMEs conform to
RFC2396 restrictions on the use of special characters in URIs.</li>
</ul>
</li>
<li><code>github.com/aws/aws-sdk-go-v2/service/auditmanager</code>: <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/auditmanager/CHANGELOG.md#v1230-2023-01-06">v1.23.0</a>
<ul>
<li><strong>Feature</strong>: This release introduces a new data
retention option in your Audit Manager settings. You can now use the
DeregistrationPolicy parameter to specify if you want to delete your
data when you deregister Audit Manager.</li>
</ul>
</li>
</ul>
<h1>Release (2023-01-05)</h1>
<h2>General Highlights</h2>
<ul>
<li><strong>Dependency Update</strong>: Updated to the latest SDK module
versions</li>
</ul>
<h2>Module Highlights</h2>
<ul>
<li><code>github.com/aws/aws-sdk-go-v2/service/accessanalyzer</code>: <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/accessanalyzer/CHANGELOG.md#v1190-2023-01-05">v1.19.0</a>
<ul>
<li><strong>Feature</strong>: Add
<code>ErrorCodeOverride</code><code>aws/smithy-go#401</code></li>
</ul>
</li>
<li><code>github.com/aws/aws-sdk-go-v2/service/account</code>: <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/account/CHANGELOG.md#v180-2023-01-05">v1.8.0</a>
<ul>
<li><strong>Feature</strong>: Add
<code>ErrorCodeOverride</code><code>aws/smithy-go#401</code></li>
</ul>
</li>
<li><code>github.com/aws/aws-sdk-go-v2/service/acm</code>: <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/acm/CHANGELOG.md#v1170-2023-01-05">v1.17.0</a>
<ul>
<li><strong>Feature</strong>: Add
<code>ErrorCodeOverride</code><code>aws/smithy-go#401</code></li>
</ul>
</li>
<li><code>github.com/aws/aws-sdk-go-v2/service/acmpca</code>: <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/acmpca/CHANGELOG.md#v1200-2023-01-05">v1.20.0</a>
<ul>
<li><strong>Feature</strong>: Add
<code>ErrorCodeOverride</code><code>aws/smithy-go#401</code></li>
</ul>
</li>
<li><code>github.com/aws/aws-sdk-go-v2/service/alexaforbusiness</code>:
<a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/alexaforbusiness/CHANGELOG.md#v1150-2023-01-05">v1.15.0</a>
<ul>
<li><strong>Feature</strong>: Add
<code>ErrorCodeOverride</code><code>aws/smithy-go#401</code></li>
</ul>
</li>
<li><code>github.com/aws/aws-sdk-go-v2/service/amp</code>: <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/amp/CHANGELOG.md#v1160-2023-01-05">v1.16.0</a>
<ul>
<li><strong>Feature</strong>: Add
<code>ErrorCodeOverride</code><code>aws/smithy-go#401</code></li>
</ul>
</li>
<li><code>github.com/aws/aws-sdk-go-v2/service/amplify</code>: <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/amplify/CHANGELOG.md#v1130-2023-01-05">v1.13.0</a>
<ul>
<li><strong>Feature</strong>: Add
<code>ErrorCodeOverride</code><code>aws/smithy-go#401</code></li>
</ul>
</li>
<li><code>github.com/aws/aws-sdk-go-v2/service/amplifybackend</code>: <a
href="https://github.com/aws/aws-sdk-go-v2/blob/main/service/amplifybackend/CHANGELOG.md#v1140-2023-01-05">v1.14.0</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="116a622a26"><code>116a622</code></a>
Release 2023-01-05</li>
<li><a
href="ce039452b6"><code>ce03945</code></a>
Regenerated Clients</li>
<li><a
href="095bbfff59"><code>095bbff</code></a>
Update API model</li>
<li><a
href="2998a9800a"><code>2998a98</code></a>
Regenerate clients with <code>ErrorCodeOverride</code> (<a
href="https://github-redirect.dependabot.com/aws/aws-sdk-go-v2/issues/1969">#1969</a>)</li>
<li><a
href="1b0a07d93d"><code>1b0a07d</code></a>
Release 2023-01-04</li>
<li><a
href="ff5b1c7a27"><code>ff5b1c7</code></a>
Regenerated Clients</li>
<li><a
href="cabea36bb4"><code>cabea36</code></a>
Update API model</li>
<li><a
href="cd385dc3b8"><code>cd385dc</code></a>
Update links to point to smithy.io</li>
<li><a
href="4dd79b8978"><code>4dd79b8</code></a>
Rename SyntheticClone to Synthetic</li>
<li><a
href="b302f0a86c"><code>b302f0a</code></a>
Release 2023-01-03</li>
<li>Additional commits viewable in <a
href="https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.27.1...service/s3/v1.30.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/aws/aws-sdk-go-v2/service/s3&package-manager=go_modules&previous-version=1.27.1&new-version=1.30.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2023-01-23 11:38:02 -08:00 committed by GitHub
parent b55499f2d8
commit cee636b47d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
68 changed files with 2944 additions and 183 deletions

22
go.mod
View File

@ -3,10 +3,10 @@ module github.com/letsencrypt/boulder
go 1.18
require (
github.com/aws/aws-sdk-go-v2 v1.16.11
github.com/aws/aws-sdk-go-v2 v1.17.3
github.com/aws/aws-sdk-go-v2/config v1.17.1
github.com/aws/aws-sdk-go-v2/service/s3 v1.27.1
github.com/aws/smithy-go v1.13.1
github.com/aws/aws-sdk-go-v2/service/s3 v1.30.0
github.com/aws/smithy-go v1.13.5
github.com/beeker1121/goque v1.0.3-0.20191103205551-d618510128af
github.com/eggsampler/acme/v3 v3.3.0
github.com/go-gorp/gorp/v3 v3.0.2
@ -40,17 +40,17 @@ require (
)
require (
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.3 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.12.14 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.12 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.19 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.5 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.8 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.18 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.22 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.21 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.21 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.11.17 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.16.13 // indirect
github.com/beorn7/perks v1.0.1 // indirect

45
go.sum
View File

@ -43,46 +43,45 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/aws/aws-sdk-go-v2 v1.16.7/go.mod h1:6CpKuLXg2w7If3ABZCl/qZ6rEgwtjZTn4eAf4RcEyuw=
github.com/aws/aws-sdk-go-v2 v1.16.11 h1:xM1ZPSvty3xVmdxiGr7ay/wlqv+MWhH0rMlyLdbC0YQ=
github.com/aws/aws-sdk-go-v2 v1.16.11/go.mod h1:WTACcleLz6VZTp7fak4EO5b9Q4foxbn+8PIz3PmyKlo=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.3 h1:S/ZBwevQkr7gv5YxONYpGQxlMFFYSRfz3RMcjsC9Qhk=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.3/go.mod h1:gNsR5CaXKmQSSzrmGxmwmct/r+ZBfbxorAuXYsj/M5Y=
github.com/aws/aws-sdk-go-v2 v1.17.3 h1:shN7NlnVzvDUgPQ+1rLMSxY8OWRNDRYtiqe0p/PgrhY=
github.com/aws/aws-sdk-go-v2 v1.17.3/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 h1:dK82zF6kkPeCo8J1e+tGx4JdvDIQzj7ygIoLg8WMuGs=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno=
github.com/aws/aws-sdk-go-v2/config v1.17.1 h1:BWxTjokU/69BZ4DnLrZco6OvBDii6ToEdfBL/y5I1nA=
github.com/aws/aws-sdk-go-v2/config v1.17.1/go.mod h1:uOxDHjBemNTF2Zos+fgG0NNfE86wn1OAHDTGxjMEYi0=
github.com/aws/aws-sdk-go-v2/credentials v1.12.14 h1:AtVG/amkjbDBfnPr/tuW2IG18HGNznP6L12Dx0rLz+Q=
github.com/aws/aws-sdk-go-v2/credentials v1.12.14/go.mod h1:opAndTyq+YN7IpVG57z2CeNuXSQMqTYxGGlYH0m0RMY=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.12 h1:wgJBHO58Pc1V1QAnzdVM3JK3WbE/6eUF0JxCZ+/izz0=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.12/go.mod h1:aZ4vZnyUuxedC7eD4JyEHpGnCz+O2sHQEx3VvAwklSE=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.14/go.mod h1:kdjrMwHwrC3+FsKhNcCMJ7tUVj/8uSD5CZXeQ4wV6fM=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18 h1:OmiwoVyLKEqqD5GvB683dbSqxiOfvx4U2lDZhG2Esc4=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18/go.mod h1:348MLhzV1GSlZSMusdwQpXKbhD7X2gbI/TxwAPKkYZQ=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.8/go.mod h1:ZIV8GYoC6WLBW5KGs+o4rsc65/ozd+eQ0L31XF5VDwk=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12 h1:5mvQDtNWtI6H56+E4LUnLWEmATMB7oEh+Z9RurtIuC0=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27 h1:I3cakv2Uy1vNmmhRQmFptYDxOvBnwCdNwyw63N0RaRU=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27/go.mod h1:a1/UpzeyBBerajpnP5nGZa9mGzsBn5cOKxm6NWQsvoI=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12/go.mod h1:ckaCVTEdGAxO6KwTGzgskxR1xM+iJW4lxMyDFVda2Fc=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21 h1:5NbbMrIzmUn/TXFqAle6mgrH5m9cOvMLRGL7pnG8tRE=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21/go.mod h1:+Gxn8jYn5k9ebfHEqlhrMirFjSW0v0C9fI+KN5vk2kE=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.19 h1:g5qq9sgtEzt2szMaDqQO6fqKe026T6dHTFJp5NsPzkQ=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.19/go.mod h1:cVHo8KTuHjShb9V8/VjH3S/8+xPu16qx8fdGwmotJhE=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.5 h1:tEEHn+PGAxRVqMPEhtU8oCSW/1Ge3zP5nUgPrGQNUPs=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.5/go.mod h1:aIwFF3dUk95ocCcA3zfk3nhz0oLkpzHFWuMp8l/4nNs=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.3 h1:4n4KCtv5SUoT5Er5XV41huuzrCqepxlW3SDI9qHQebc=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.3/go.mod h1:gkb2qADY+OHaGLKNTYxMaQNacfeyQpZ4csDTQMeFmcw=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.9 h1:gVv2vXOMqJeR4ZHHV32K7LElIJIIzyw/RU1b0lSfWTQ=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.9/go.mod h1:EF5RLnD9l0xvEWwMRcktIS/dI6lF8lU5eV3B13k6sWo=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.8/go.mod h1:rDVhIMAX9N2r8nWxDUlbubvvaFMnfsm+3jAV7q+rpM4=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12 h1:7iPTTX4SAI2U2VOogD7/gmHlsgnYSgoNHt7MSQXtG2M=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.18 h1:H/mF2LNWwX00lD6FlYfKpLLZgUW7oIzCBkig78x4Xok=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.18/go.mod h1:T2Ku+STrYQ1zIkL1wMvj8P3wWQaaCMKNdz70MT2FLfE=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 h1:y2+VQzC6Zh2ojtV2LoC0MNwHWc6qXv/j2vrQtlftkdA=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.22 h1:kv5vRAl00tozRxSnI0IszPWGXsJOyA7hmEUHFYqsyvw=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.22/go.mod h1:Od+GU5+Yx41gryN/ZGZzAJMZ9R1yn6lgA0fD5Lo5SkQ=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12/go.mod h1:1TODGhheLWjpQWSuhYuAUWYTCKwEjx2iblIFKDHjeTc=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.8 h1:TlN1UC39A0LUNoD51ubO5h32haznA+oVe15jO9O4Lj0=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.8/go.mod h1:JlVwmWtT/1c5W+6oUsjXjAJ0iJZ+hlghdrDy/8JxGCU=
github.com/aws/aws-sdk-go-v2/service/s3 v1.27.1 h1:OKQIQ0QhEBmGr2LfT952meIZz3ujrPYnxH+dO/5ldnI=
github.com/aws/aws-sdk-go-v2/service/s3 v1.27.1/go.mod h1:NffjpNsMUFXp6Ok/PahrktAncoekWrywvmIK83Q2raE=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.21 h1:5C6XgTViSb0bunmU57b3CT+MhxULqHH2721FVA+/kDM=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.21/go.mod h1:lRToEJsn+DRA9lW4O9L9+/3hjTkUzlzyzHqn8MTds5k=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.21 h1:vY5siRXvW5TrOKm2qKEf9tliBfdLxdfy0i02LOcmqUo=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.21/go.mod h1:WZvNXT1XuH8dnJM0HvOlvk+RNn7NbAPvA/ACO0QarSc=
github.com/aws/aws-sdk-go-v2/service/s3 v1.30.0 h1:wddsyuESfviaiXk3w9N6/4iRwTg/a3gktjODY6jYQBo=
github.com/aws/aws-sdk-go-v2/service/s3 v1.30.0/go.mod h1:L2l2/q76teehcW7YEsgsDjqdsDTERJeX3nOMIFlgGUE=
github.com/aws/aws-sdk-go-v2/service/sso v1.11.17 h1:pXxu9u2z1UqSbjO9YA8kmFJBhFc1EVTDaf7A+S+Ivq8=
github.com/aws/aws-sdk-go-v2/service/sso v1.11.17/go.mod h1:mS5xqLZc/6kc06IpXn5vRxdLaED+jEuaSRv5BxtnsiY=
github.com/aws/aws-sdk-go-v2/service/sts v1.16.13 h1:dl8T0PJlN92rvEGOEUiD0+YPYdPEaCZK0TqHukvSfII=
github.com/aws/aws-sdk-go-v2/service/sts v1.16.13/go.mod h1:Ru3QVMLygVs/07UQ3YDur1AQZZp2tUNje8wfloFttC0=
github.com/aws/smithy-go v1.12.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/aws/smithy-go v1.12.1/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/aws/smithy-go v1.13.1 h1:q09BdpUiaqpothcv393ACfWJJHzlzjB5HaNL1XHKmoQ=
github.com/aws/smithy-go v1.13.1/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8=
github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/beeker1121/goque v1.0.3-0.20191103205551-d618510128af h1:XbgLdZvVbWsK9HAhAYOp6rksTAdOVYDBQtGSVOLlJrw=
github.com/beeker1121/goque v1.0.3-0.20191103205551-d618510128af/go.mod h1:84CWnaDz4g1tEVnFLnuBigmGK15oPohy0RfvSN8d4eg=

View File

@ -9,3 +9,6 @@ Gemfile.lock
/private/model/cli/gen-api/gen-api
.gradle/
build/
.idea/
bin/
.vscode/

View File

@ -6,7 +6,7 @@ modules-download-mode = "readonly"
allow-parallel-runners = true
skip-dirs = ["internal/repotools"]
skip-dirs-use-default = true
skip-files = ["service/transcribestreaming/eventstream_test.go"]
[output]
format = "github-actions"

File diff suppressed because it is too large Load Diff

View File

@ -72,22 +72,22 @@ all: generate unit
# Code Generation #
###################
.PHONY: generate smithy-generate smithy-build smithy-build-% smithy-clean smithy-go-publish-local format \
gen-config-asserts gen-repo-mod-replace gen-mod-replace-smithy gen-mod-dropreplace-smithy gen-aws-ptrs tidy-modules-% \
gen-config-asserts gen-repo-mod-replace gen-mod-replace-smithy gen-mod-dropreplace-smithy-% gen-aws-ptrs tidy-modules-% \
add-module-license-files sync-models sync-endpoints-model sync-endpoints.json clone-v1-models gen-internal-codegen \
sync-api-models copy-attributevalue-feature min-go-version-% update-requires smithy-annotate-stable \
update-module-metadata download-modules-%
generate: smithy-generate update-requires gen-repo-mod-replace update-module-metadata smithy-annotate-stable \
gen-config-asserts gen-internal-codegen copy-attributevalue-feature gen-mod-dropreplace-smithy min-go-version-. \
gen-config-asserts gen-internal-codegen copy-attributevalue-feature gen-mod-dropreplace-smithy-. min-go-version-. \
tidy-modules-. add-module-license-files gen-aws-ptrs format
smithy-generate:
cd codegen && ./gradlew clean build -Plog-tests && ./gradlew clean
smithy-build: gen-repo-mod-replace
smithy-build:
cd codegen && ./gradlew clean build -Plog-tests
smithy-build-%: gen-repo-mod-replace
smithy-build-%:
@# smithy-build- command that uses the pattern to define build filter that
@# the smithy API model service id starts with. Strips off the
@# "smithy-build-".
@ -120,19 +120,32 @@ gen-config-asserts:
gen-internal-codegen:
@echo "Generating internal/codegen"
cd internal/codegen \
&& go mod tidy \
&& go generate
gen-repo-mod-replace:
@echo "Generating go.mod replace for repo modules"
go run ${REPOTOOLS_CMD_MAKE_RELATIVE}
gen-mod-replace-smithy:
gen-mod-replace-smithy-%:
@# gen-mod-replace-smithy- command that uses the pattern to define build filter that
@# for modules to add replace to. Strips off the "gen-mod-replace-smithy-".
@#
@# SMITHY_GO_SRC environment variable is the path to add replace to
@#
@# e.g. gen-mod-replace-smithy-service_ssooidc
cd ./internal/repotools/cmd/eachmodule \
&& go run . "go mod edit -replace github.com/aws/smithy-go=${SMITHY_GO_SRC}"
&& go run . -p $(subst _,/,$(subst gen-mod-replace-smithy-,,$@)) ${EACHMODULE_FLAGS} \
"go mod edit -replace github.com/aws/smithy-go=${SMITHY_GO_SRC}"
gen-mod-dropreplace-smithy:
gen-mod-dropreplace-smithy-%:
@# gen-mod-dropreplace-smithy- command that uses the pattern to define build filter that
@# for modules to add replace to. Strips off the "gen-mod-dropreplace-smithy-".
@#
@# e.g. gen-mod-dropreplace-smithy-service_ssooidc
cd ./internal/repotools/cmd/eachmodule \
&& go run . "go mod edit -dropreplace github.com/aws/smithy-go"
&& go run . -p $(subst _,/,$(subst gen-mod-dropreplace-smithy-,,$@)) ${EACHMODULE_FLAGS} \
"go mod edit -dropreplace github.com/aws/smithy-go"
gen-aws-ptrs:
cd aws && go generate

View File

@ -7,7 +7,7 @@
The v2 SDK requires a minimum version of `Go 1.15`.
Checkout out the [release notes](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md) for information about the latest bug
Check out the [release notes](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md) for information about the latest bug
fixes, updates, and features added to the SDK.
Jump To:
@ -107,7 +107,7 @@ This SDK implements AWS service APIs. For general issues regarding the AWS servi
If you encounter a bug with the AWS SDK for Go we would like to hear about it.
Search the [existing issues][Issues] and see
if others are also experiencing the issue before opening a new issue. Please
if others are also experiencing the same issue before opening a new issue. Please
include the version of AWS SDK for Go, Go language, and OS youre using. Please
also include reproduction case when appropriate.

View File

@ -3,13 +3,14 @@ package aws
import (
"net/http"
smithybearer "github.com/aws/smithy-go/auth/bearer"
"github.com/aws/smithy-go/logging"
"github.com/aws/smithy-go/middleware"
)
// HTTPClient provides the interface to provide custom HTTPClients. Generally
// *http.Client is sufficient for most use cases. The HTTPClient should not
// follow redirects.
// follow 301 or 302 redirects.
type HTTPClient interface {
Do(*http.Request) (*http.Response, error)
}
@ -25,11 +26,23 @@ type Config struct {
// information on AWS regions.
Region string
// The credentials object to use when signing requests. Defaults to a
// chain of credential providers to search for credentials in environment
// variables, shared credential file, and EC2 Instance Roles.
// The credentials object to use when signing requests.
// Use the LoadDefaultConfig to load configuration from all the SDK's supported
// sources, and resolve credentials using the SDK's default credential chain.
Credentials CredentialsProvider
// The Bearer Authentication token provider to use for authenticating API
// operation calls with a Bearer Authentication token. The API clients and
// operation must support Bearer Authentication scheme in order for the
// token provider to be used. API clients created with NewFromConfig will
// automatically be configured with this option, if the API client support
// Bearer Authentication.
//
// The SDK's config.LoadDefaultConfig can automatically populate this
// option for external configuration options such as SSO session.
// https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
BearerAuthTokenProvider smithybearer.TokenProvider
// The HTTP Client the SDK's API clients will use to invoke HTTP requests.
// The SDK defaults to a BuildableClient allowing API clients to create
// copies of the HTTP Client for service specific customizations.

View File

@ -178,6 +178,12 @@ func (p *CredentialsCache) Invalidate() {
p.creds.Store((*Credentials)(nil))
}
// IsCredentialsProvider returns whether credential provider wrapped by CredentialsCache
// matches the target provider type.
func (p *CredentialsCache) IsCredentialsProvider(target CredentialsProvider) bool {
return IsCredentialsProvider(p.provider, target)
}
// HandleFailRefreshCredentialsCacheStrategy is an interface for
// CredentialsCache to allow CredentialsProvider how failed to refresh
// credentials is handled.

View File

@ -3,6 +3,7 @@ package aws
import (
"context"
"fmt"
"reflect"
"time"
"github.com/aws/aws-sdk-go-v2/internal/sdk"
@ -129,3 +130,41 @@ type CredentialsProviderFunc func(context.Context) (Credentials, error)
func (fn CredentialsProviderFunc) Retrieve(ctx context.Context) (Credentials, error) {
return fn(ctx)
}
type isCredentialsProvider interface {
IsCredentialsProvider(CredentialsProvider) bool
}
// IsCredentialsProvider returns whether the target CredentialProvider is the same type as provider when comparing the
// implementation type.
//
// If provider has a method IsCredentialsProvider(CredentialsProvider) bool it will be responsible for validating
// whether target matches the credential provider type.
//
// When comparing the CredentialProvider implementations provider and target for equality, the following rules are used:
//
// If provider is of type T and target is of type V, true if type *T is the same as type *V, otherwise false
// If provider is of type *T and target is of type V, true if type *T is the same as type *V, otherwise false
// If provider is of type T and target is of type *V, true if type *T is the same as type *V, otherwise false
// If provider is of type *T and target is of type *V,true if type *T is the same as type *V, otherwise false
func IsCredentialsProvider(provider, target CredentialsProvider) bool {
if target == nil || provider == nil {
return provider == target
}
if x, ok := provider.(isCredentialsProvider); ok {
return x.IsCredentialsProvider(target)
}
targetType := reflect.TypeOf(target)
if targetType.Kind() != reflect.Ptr {
targetType = reflect.PtrTo(targetType)
}
providerType := reflect.TypeOf(provider)
if providerType.Kind() != reflect.Ptr {
providerType = reflect.PtrTo(providerType)
}
return targetType.AssignableTo(providerType)
}

View File

@ -3,4 +3,4 @@
package aws
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.16.11"
const goModuleVersion = "1.17.3"

View File

@ -1,3 +1,31 @@
# v1.4.10 (2022-12-02)
* No change notes available for this release.
# v1.4.9 (2022-10-24)
* No change notes available for this release.
# v1.4.8 (2022-09-14)
* No change notes available for this release.
# v1.4.7 (2022-09-02)
* No change notes available for this release.
# v1.4.6 (2022-08-31)
* No change notes available for this release.
# v1.4.5 (2022-08-29)
* No change notes available for this release.
# v1.4.4 (2022-08-09)
* No change notes available for this release.
# v1.4.3 (2022-06-29)
* No change notes available for this release.

View File

@ -3,4 +3,4 @@
package eventstream
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.4.3"
const goModuleVersion = "1.4.10"

View File

@ -93,7 +93,7 @@ func (a *AdaptiveMode) IsErrorRetryable(err error) bool {
}
// MaxAttempts returns the maximum number of attempts that can be made for
// a attempt before failing. A value of 0 implies that the attempt should
// an attempt before failing. A value of 0 implies that the attempt should
// be retried until it succeeds if the errors are retryable.
func (a *AdaptiveMode) MaxAttempts() int {
return a.retryer.MaxAttempts()
@ -127,7 +127,7 @@ func (a *AdaptiveMode) GetInitialToken() (releaseToken func(error) error) {
// GetAttemptToken returns the attempt token that can be used to rate limit
// attempt calls. Will be used by the SDK's retry package's Attempt
// middleware to get a attempt token prior to calling the temp and releasing
// middleware to get an attempt token prior to calling the temp and releasing
// the attempt token after the attempt has been made.
func (a *AdaptiveMode) GetAttemptToken(ctx context.Context) (func(error) error, error) {
for {

View File

@ -49,7 +49,7 @@ type Retryer interface {
IsErrorRetryable(error) bool
// MaxAttempts returns the maximum number of attempts that can be made for
// a attempt before failing. A value of 0 implies that the attempt should
// an attempt before failing. A value of 0 implies that the attempt should
// be retried until it succeeds if the errors are retryable.
MaxAttempts() int
@ -66,7 +66,7 @@ type Retryer interface {
GetInitialToken() (releaseToken func(error) error)
}
// RetryerV2 is an interface to determine if a given error from a attempt
// RetryerV2 is an interface to determine if a given error from an attempt
// should be retried, and if so what backoff delay to apply. The default
// implementation used by most services is the retry package's Standard type.
// Which contains basic retry logic using exponential backoff.

View File

@ -82,7 +82,7 @@ func (m *dynamicPayloadSigningMiddleware) HandleBuild(
}
// if TLS is enabled, use unsigned payload when supported
if strings.EqualFold(req.URL.Scheme, "https") {
if req.IsHTTPS() {
return (&unsignedPayload{}).HandleBuild(ctx, in, next)
}
@ -371,13 +371,8 @@ func haveCredentialProvider(p aws.CredentialsProvider) bool {
if p == nil {
return false
}
switch p.(type) {
case aws.AnonymousCredentials,
*aws.AnonymousCredentials:
return false
}
return true
return !aws.IsCredentialsProvider(p, (*aws.AnonymousCredentials)(nil))
}
type payloadHashKey struct{}

View File

@ -1,3 +1,39 @@
# v1.1.27 (2022-12-15)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.26 (2022-12-02)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.25 (2022-10-24)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.24 (2022-10-21)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.23 (2022-09-20)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.22 (2022-09-14)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.21 (2022-09-02)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.20 (2022-08-31)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.19 (2022-08-29)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.18 (2022-08-11)
* **Dependency Update**: Updated to the latest SDK module versions

View File

@ -3,4 +3,4 @@
package configsources
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.1.18"
const goModuleVersion = "1.1.27"

View File

@ -1,3 +1,39 @@
# v2.4.21 (2022-12-15)
* **Dependency Update**: Updated to the latest SDK module versions
# v2.4.20 (2022-12-02)
* **Dependency Update**: Updated to the latest SDK module versions
# v2.4.19 (2022-10-24)
* **Dependency Update**: Updated to the latest SDK module versions
# v2.4.18 (2022-10-21)
* **Dependency Update**: Updated to the latest SDK module versions
# v2.4.17 (2022-09-20)
* **Dependency Update**: Updated to the latest SDK module versions
# v2.4.16 (2022-09-14)
* **Dependency Update**: Updated to the latest SDK module versions
# v2.4.15 (2022-09-02)
* **Dependency Update**: Updated to the latest SDK module versions
# v2.4.14 (2022-08-31)
* **Dependency Update**: Updated to the latest SDK module versions
# v2.4.13 (2022-08-29)
* **Dependency Update**: Updated to the latest SDK module versions
# v2.4.12 (2022-08-11)
* **Dependency Update**: Updated to the latest SDK module versions

View File

@ -3,4 +3,4 @@
package endpoints
// goModuleVersion is the tagged release for this module
const goModuleVersion = "2.4.12"
const goModuleVersion = "2.4.21"

View File

@ -1,3 +1,56 @@
# v1.0.18 (2022-12-15)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.0.17 (2022-12-02)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.0.16 (2022-10-24)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.0.15 (2022-10-21)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.0.14 (2022-09-20)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.0.13 (2022-09-14)
* **Bug Fix**: Fixes an issues where an error from an underlying SigV4 credential provider would not be surfaced from the SigV4a credential provider. Contribution by [sakthipriyan-aqfer](https://github.com/sakthipriyan-aqfer).
* **Dependency Update**: Updated to the latest SDK module versions
# v1.0.12 (2022-09-02)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.0.11 (2022-08-31)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.0.10 (2022-08-29)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.0.9 (2022-08-11)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.0.8 (2022-08-09)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.0.7 (2022-08-08)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.0.6 (2022-08-01)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.0.5 (2022-07-05)
* **Dependency Update**: Updated to the latest SDK module versions

View File

@ -51,7 +51,7 @@ type SymmetricCredentialAdaptor struct {
func (s *SymmetricCredentialAdaptor) Retrieve(ctx context.Context) (aws.Credentials, error) {
symCreds, err := s.retrieveFromSymmetricProvider(ctx)
if err != nil {
return aws.Credentials{}, nil
return aws.Credentials{}, err
}
if asymCreds := s.getCreds(); asymCreds == nil {

View File

@ -3,4 +3,4 @@
package v4a
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.0.5"
const goModuleVersion = "1.0.18"

View File

@ -5,10 +5,10 @@ import "fmt"
// ConstantTimeByteCompare is a constant-time byte comparison of x and y. This function performs an absolute comparison
// if the two byte slices assuming they represent a big-endian number.
//
// error if len(x) != len(y)
// -1 if x < y
// 0 if x == y
// +1 if x > y
// error if len(x) != len(y)
// -1 if x < y
// 0 if x == y
// +1 if x > y
func ConstantTimeByteCompare(x, y []byte) (int, error) {
if len(x) != len(y) {
return 0, fmt.Errorf("slice lengths do not match")

View File

@ -1,10 +1,10 @@
[dependencies]
"github.com/aws/aws-sdk-go" = "v1.44.28"
"github.com/aws/smithy-go" = "v1.12.1"
"github.com/aws/smithy-go" = "v1.13.5"
"github.com/google/go-cmp" = "v0.5.8"
"github.com/jmespath/go-jmespath" = "v0.4.0"
"golang.org/x/net" = "v0.0.0-20220127200216-cd36cc0744dd"
"golang.org/x/net" = "v0.1.0"
[modules]

View File

@ -1,3 +1,35 @@
# v1.9.11 (2022-12-02)
* No change notes available for this release.
# v1.9.10 (2022-10-24)
* No change notes available for this release.
# v1.9.9 (2022-09-14)
* No change notes available for this release.
# v1.9.8 (2022-09-02)
* No change notes available for this release.
# v1.9.7 (2022-08-31)
* No change notes available for this release.
# v1.9.6 (2022-08-29)
* No change notes available for this release.
# v1.9.5 (2022-08-11)
* No change notes available for this release.
# v1.9.4 (2022-08-09)
* No change notes available for this release.
# v1.9.3 (2022-06-29)
* No change notes available for this release.

View File

@ -1,7 +1,7 @@
/*
Package acceptencoding provides customizations associated with Accept Encoding Header.
Accept encoding gzip
# Accept encoding gzip
The Go HTTP client automatically supports accept-encoding and content-encoding
gzip by default. This default behavior is not desired by the SDK, and prevents
@ -18,6 +18,5 @@ client's default behavior.
An `EnableAcceptEncodingGzip` option may or may not be present depending on the client using
the below middleware. The option if present can be used to enable auto decompressing
gzip by the SDK.
*/
package acceptencoding

View File

@ -3,4 +3,4 @@
package acceptencoding
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.9.3"
const goModuleVersion = "1.9.11"

View File

@ -1,3 +1,55 @@
# v1.1.22 (2022-12-15)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.21 (2022-12-02)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.20 (2022-10-24)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.19 (2022-10-21)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.18 (2022-09-20)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.17 (2022-09-14)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.16 (2022-09-02)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.15 (2022-08-31)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.14 (2022-08-29)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.13 (2022-08-11)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.12 (2022-08-09)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.11 (2022-08-08)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.10 (2022-08-01)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.1.9 (2022-07-05)
* **Dependency Update**: Updated to the latest SDK module versions

View File

@ -71,11 +71,11 @@ type awsChunkedTrailerValue struct {
// Here is the aws-chunked payload stream as read from the awsChunkedEncoding
// if original request stream is "Hello world", and checksum hash used is SHA256
//
// <b>\r\n
// Hello world\r\n
// 0\r\n
// x-amz-checksum-sha256:ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=\r\n
// \r\n
// <b>\r\n
// Hello world\r\n
// 0\r\n
// x-amz-checksum-sha256:ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=\r\n
// \r\n
type awsChunkedEncoding struct {
options awsChunkedEncodingOptions

View File

@ -3,4 +3,4 @@
package checksum
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.1.9"
const goModuleVersion = "1.1.22"

View File

@ -7,7 +7,6 @@ import (
"hash"
"io"
"strconv"
"strings"
v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
@ -97,9 +96,9 @@ func (e computeInputHeaderChecksumError) Error() string {
func (e computeInputHeaderChecksumError) Unwrap() error { return e.Err }
// HandleBuild handles computing the payload's checksum, in the following cases:
// * Is HTTP, not HTTPS
// * RequireChecksum is true, and no checksums were specified via the Input
// * Trailing checksums are not supported
// - Is HTTP, not HTTPS
// - RequireChecksum is true, and no checksums were specified via the Input
// - Trailing checksums are not supported
//
// The build handler must be inserted in the stack before ContentPayloadHash
// and after ComputeContentLength.
@ -176,7 +175,7 @@ func (m *computeInputPayloadChecksum) HandleBuild(
//
// Nil and empty streams will always be handled as a request header,
// regardless if the operation supports trailing checksums or not.
if strings.EqualFold(req.URL.Scheme, "https") {
if req.IsHTTPS() {
if stream != nil && streamLength != 0 && m.EnableTrailingChecksum {
if m.EnableComputePayloadHash {
// payload hash is set as header in Build middleware handler,
@ -246,9 +245,9 @@ func (e computeInputTrailingChecksumError) Error() string {
func (e computeInputTrailingChecksumError) Unwrap() error { return e.Err }
// HandleFinalize handles computing the payload's checksum, in the following cases:
// * Is HTTPS, not HTTP
// * A checksum was specified via the Input
// * Trailing checksums are supported.
// - Is HTTPS, not HTTP
// - A checksum was specified via the Input
// - Trailing checksums are supported.
//
// The finalize handler must be inserted in the stack before Signing, and after Retry.
func (m *computeInputPayloadChecksum) HandleFinalize(
@ -273,7 +272,7 @@ func (m *computeInputPayloadChecksum) HandleFinalize(
}
// Trailing checksums are only supported when TLS is enabled.
if !strings.EqualFold(req.URL.Scheme, "https") {
if !req.IsHTTPS() {
return out, metadata, computeInputTrailingChecksumError{
Msg: "HTTPS required",
}

View File

@ -1,3 +1,39 @@
# v1.9.21 (2022-12-15)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.9.20 (2022-12-02)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.9.19 (2022-10-24)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.9.18 (2022-10-21)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.9.17 (2022-09-20)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.9.16 (2022-09-14)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.9.15 (2022-09-02)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.9.14 (2022-08-31)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.9.13 (2022-08-29)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.9.12 (2022-08-11)
* **Dependency Update**: Updated to the latest SDK module versions

View File

@ -3,4 +3,4 @@
package presignedurl
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.9.12"
const goModuleVersion = "1.9.21"

View File

@ -1,3 +1,55 @@
# v1.13.21 (2022-12-15)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.13.20 (2022-12-02)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.13.19 (2022-10-24)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.13.18 (2022-10-21)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.13.17 (2022-09-20)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.13.16 (2022-09-14)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.13.15 (2022-09-02)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.13.14 (2022-08-31)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.13.13 (2022-08-29)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.13.12 (2022-08-11)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.13.11 (2022-08-09)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.13.10 (2022-08-08)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.13.9 (2022-08-01)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.13.8 (2022-07-05)
* **Dependency Update**: Updated to the latest SDK module versions

View File

@ -21,9 +21,8 @@ func (a AccessPointARN) GetARN() arn.ARN {
// AccessPoint resource.
//
// Supported Access point resource format:
// - Access point format: arn:{partition}:s3:{region}:{accountId}:accesspoint/{accesspointName}
// - example: arn:aws:s3:us-west-2:012345678901:accesspoint/myaccesspoint
//
// - Access point format: arn:{partition}:s3:{region}:{accountId}:accesspoint/{accesspointName}
// - example: arn:aws:s3:us-west-2:012345678901:accesspoint/myaccesspoint
func ParseAccessPointResource(a arn.ARN, resParts []string) (AccessPointARN, error) {
if isFIPS(a.Region) {
return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "FIPS region not allowed in ARN"}

View File

@ -17,15 +17,14 @@ type OutpostARN interface {
//
// Currently supported outpost ARN formats:
// * Outpost AccessPoint ARN format:
// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/accesspoint/{accesspointName}
// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/accesspoint/myaccesspoint
// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/accesspoint/{accesspointName}
// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/accesspoint/myaccesspoint
//
// * Outpost Bucket ARN format:
// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/bucket/{bucketName}
// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/bucket/mybucket
// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/bucket/{bucketName}
// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/bucket/mybucket
//
// Other outpost ARN formats may be supported and added in the future.
//
func ParseOutpostARNResource(a arn.ARN, resParts []string) (OutpostARN, error) {
if len(a.Region) == 0 {
return nil, InvalidARNError{ARN: a, Reason: "region not set"}
@ -113,7 +112,6 @@ func (o OutpostBucketARN) GetARN() arn.ARN {
// bucket resource id.
//
// parseBucketResource only parses the bucket resource id.
//
func parseBucketResource(a arn.ARN, resParts []string) (bucketName string, err error) {
if len(resParts) == 0 {
return bucketName, InvalidARNError{ARN: a, Reason: "bucket resource-id not set"}

View File

@ -3,4 +3,4 @@
package s3shared
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.13.8"
const goModuleVersion = "1.13.21"

View File

@ -1,3 +1,81 @@
# v1.30.0 (2023-01-05)
* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
# v1.29.6 (2022-12-15)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.29.5 (2022-12-02)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.29.4 (2022-11-22)
* No change notes available for this release.
# v1.29.3 (2022-11-16)
* No change notes available for this release.
# v1.29.2 (2022-11-10)
* No change notes available for this release.
# v1.29.1 (2022-10-24)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.29.0 (2022-10-21)
* **Feature**: S3 on Outposts launches support for automatic bucket-style alias. You can use the automatic access point alias instead of an access point ARN for any object-level operation in an Outposts bucket.
* **Bug Fix**: The SDK client has been updated to utilize the `aws.IsCredentialsProvider` function for determining if `aws.AnonymousCredentials` has been configured for the `CredentialProvider`.
* **Dependency Update**: Updated to the latest SDK module versions
# v1.28.0 (2022-10-19)
* **Feature**: Updates internal logic for constructing API endpoints. We have added rule-based endpoints and internal model parameters.
# v1.27.11 (2022-09-20)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.27.10 (2022-09-14)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.27.9 (2022-09-02)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.27.8 (2022-08-31)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.27.7 (2022-08-30)
* No change notes available for this release.
# v1.27.6 (2022-08-29)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.27.5 (2022-08-11)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.27.4 (2022-08-09)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.27.3 (2022-08-08)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.27.2 (2022-08-01)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.27.1 (2022-07-05)
* **Dependency Update**: Updated to the latest SDK module versions

View File

@ -487,8 +487,7 @@ func resolveCredentialProvider(o *Options) {
return
}
switch o.Credentials.(type) {
case aws.AnonymousCredentials, *aws.AnonymousCredentials:
if aws.IsCredentialsProvider(o.Credentials, (*aws.AnonymousCredentials)(nil)) {
return
}

View File

@ -142,7 +142,7 @@ import (
// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the
// Amazon Web Services General Reference.
//
// Related Resources
// # Related Resources
//
// * CreateBucket
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)

View File

@ -63,7 +63,7 @@ import (
// bucket, or you do not have the s3:PutAnalyticsConfiguration bucket permission to
// set the configuration on the bucket.
//
// Related Resources
// # Related Resources
//
// *
// GetBucketAnalyticsConfiguration

View File

@ -64,7 +64,7 @@ import (
// of the specified bucket, or you do not have the s3:PutInventoryConfiguration
// bucket permission to set the configuration on the bucket.
//
// Related Resources
// # Related Resources
//
// *
// GetBucketInventoryConfiguration

View File

@ -191,7 +191,7 @@ import (
// * If the object is previously
// restored, Amazon S3 returns 200 OK in the response.
//
// Special Errors
// # Special Errors
//
// * Code:
// RestoreAlreadyInProgress
@ -217,7 +217,7 @@ import (
//
// * SOAP Fault Code Prefix: N/A
//
// Related Resources
// # Related Resources
//
// *
// PutBucketLifecycleConfiguration

View File

@ -79,7 +79,7 @@ import (
// *
// x-amz-server-side-encryption-customer-key-MD5
//
// Special Errors
// # Special Errors
//
// * Code:
// NoSuchUpload
@ -93,7 +93,7 @@ import (
// * SOAP Fault Code Prefix:
// Client
//
// Related Resources
// # Related Resources
//
// * CreateMultipartUpload
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)

View File

@ -97,7 +97,7 @@ import (
// * HTTP Status Code: 400
// Bad Request
//
// Related Resources
// # Related Resources
//
// * CreateMultipartUpload
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)

View File

@ -2,6 +2,4 @@
// Package s3 provides the API client, operations, and parameter types for Amazon
// Simple Storage Service.
//
//
package s3

View File

@ -3,4 +3,4 @@
package s3
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.27.1"
const goModuleVersion = "1.30.0"

View File

@ -3,16 +3,15 @@ Package customizations provides customizations for the Amazon S3 API client.
This package provides support for following S3 customizations
ProcessARN Middleware: processes an ARN if provided as input and updates the endpoint as per the arn type
ProcessARN Middleware: processes an ARN if provided as input and updates the endpoint as per the arn type
UpdateEndpoint Middleware: resolves a custom endpoint as per s3 config options
UpdateEndpoint Middleware: resolves a custom endpoint as per s3 config options
RemoveBucket Middleware: removes a serialized bucket name from request url path
RemoveBucket Middleware: removes a serialized bucket name from request url path
processResponseWith200Error Middleware: Deserializing response error with 200 status code
processResponseWith200Error Middleware: Deserializing response error with 200 status code
Virtual Host style url addressing
# Virtual Host style url addressing
Since serializers serialize by default as path style url, we use customization
to modify the endpoint url when `UsePathStyle` option on S3Client is unset or
@ -24,8 +23,7 @@ UsePathStyle was enabled. This behavior is also used if UseDualStackEndpoint is
https://docs.aws.amazon.com/AmazonS3/latest/dev/dual-stack-endpoints.html#dual-stack-endpoints-description
Transfer acceleration
# Transfer acceleration
By default S3 Transfer acceleration support is disabled. By enabling `UseAccelerate`
option on S3Client, one can enable s3 transfer acceleration support. Transfer
@ -33,15 +31,12 @@ acceleration only works with Virtual Host style addressing, and thus `UsePathSty
option if set is ignored. Transfer acceleration is not supported for S3 operations
DeleteBucket, ListBuckets, and CreateBucket.
Dualstack support
# Dualstack support
By default dualstack support for s3 client is disabled. By enabling `UseDualstack`
option on s3 client, you can enable dualstack endpoint support.
Endpoint customizations
# Endpoint customizations
Customizations to lookup ARN, process ARN needs to happen before request serialization.
UpdateEndpoint middleware which mutates resources based on Options such as
@ -49,25 +44,24 @@ UseDualstack, UseAccelerate for modifying resolved endpoint are executed after
request serialization. Remove bucket middleware is executed after
an request is serialized, and removes the serialized bucket name from request path
Middleware layering:
Middleware layering:
Initialize : HTTP Request -> ARN Lookup -> Input-Validation -> Serialize step
Serialize : HTTP Request -> Process ARN -> operation serializer -> Update-Endpoint customization -> Remove-Bucket -> next middleware
Initialize : HTTP Request -> ARN Lookup -> Input-Validation -> Serialize step
Serialize : HTTP Request -> Process ARN -> operation serializer -> Update-Endpoint customization -> Remove-Bucket -> next middleware
Customization options:
UseARNRegion (Disabled by Default)
UsePathStyle (Disabled by Default)
UseARNRegion (Disabled by Default)
UseAccelerate (Disabled by Default)
UsePathStyle (Disabled by Default)
UseDualstack (Disabled by Default)
UseAccelerate (Disabled by Default)
UseDualstack (Disabled by Default)
Handle Error response with 200 status code
# Handle Error response with 200 status code
S3 operations: CopyObject, CompleteMultipartUpload, UploadPartCopy can have an
error Response with status code 2xx. The processResponseWith200Error middleware
@ -79,9 +73,8 @@ than response deserialization. Since the behavior of Deserialization is in
reverse order to the other stack steps its easier to consider that "after" means
"before".
Middleware layering:
HTTP Response -> handle 200 error customization -> deserialize
Middleware layering:
HTTP Response -> handle 200 error customization -> deserialize
*/
package customizations

View File

@ -195,6 +195,15 @@ var defaultPartitions = endpoints.Partitions{
}: {
Hostname: "s3.dualstack.ap-south-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "ap-south-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-south-2",
Variant: endpoints.DualStackVariant,
}: {
Hostname: "s3.dualstack.ap-south-2.amazonaws.com",
},
endpoints.EndpointKey{
Region: "ap-southeast-1",
}: endpoints.Endpoint{
@ -269,6 +278,15 @@ var defaultPartitions = endpoints.Partitions{
}: {
Hostname: "s3.dualstack.eu-central-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "eu-central-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-central-2",
Variant: endpoints.DualStackVariant,
}: {
Hostname: "s3.dualstack.eu-central-2.amazonaws.com",
},
endpoints.EndpointKey{
Region: "eu-north-1",
}: endpoints.Endpoint{},
@ -287,6 +305,15 @@ var defaultPartitions = endpoints.Partitions{
}: {
Hostname: "s3.dualstack.eu-south-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "eu-south-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-south-2",
Variant: endpoints.DualStackVariant,
}: {
Hostname: "s3.dualstack.eu-south-2.amazonaws.com",
},
endpoints.EndpointKey{
Region: "eu-west-1",
}: endpoints.Endpoint{
@ -363,6 +390,15 @@ var defaultPartitions = endpoints.Partitions{
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "me-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "me-central-1",
Variant: endpoints.DualStackVariant,
}: {
Hostname: "s3.dualstack.me-central-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "me-south-1",
}: endpoints.Endpoint{},

View File

@ -88,6 +88,7 @@ const (
BucketLocationConstraintApSouth1 BucketLocationConstraint = "ap-south-1"
BucketLocationConstraintApSoutheast1 BucketLocationConstraint = "ap-southeast-1"
BucketLocationConstraintApSoutheast2 BucketLocationConstraint = "ap-southeast-2"
BucketLocationConstraintApSoutheast3 BucketLocationConstraint = "ap-southeast-3"
BucketLocationConstraintCaCentral1 BucketLocationConstraint = "ca-central-1"
BucketLocationConstraintCnNorth1 BucketLocationConstraint = "cn-north-1"
BucketLocationConstraintCnNorthwest1 BucketLocationConstraint = "cn-northwest-1"
@ -120,6 +121,7 @@ func (BucketLocationConstraint) Values() []BucketLocationConstraint {
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"ap-southeast-3",
"ca-central-1",
"cn-north-1",
"cn-northwest-1",

View File

@ -12,6 +12,8 @@ import (
type BucketAlreadyExists struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
@ -24,7 +26,12 @@ func (e *BucketAlreadyExists) ErrorMessage() string {
}
return *e.Message
}
func (e *BucketAlreadyExists) ErrorCode() string { return "BucketAlreadyExists" }
func (e *BucketAlreadyExists) ErrorCode() string {
if e.ErrorCodeOverride == nil {
return "BucketAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *BucketAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The bucket you tried to create already exists, and you own it. Amazon S3 returns
@ -35,6 +42,8 @@ func (e *BucketAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.Fau
type BucketAlreadyOwnedByYou struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
@ -47,13 +56,20 @@ func (e *BucketAlreadyOwnedByYou) ErrorMessage() string {
}
return *e.Message
}
func (e *BucketAlreadyOwnedByYou) ErrorCode() string { return "BucketAlreadyOwnedByYou" }
func (e *BucketAlreadyOwnedByYou) ErrorCode() string {
if e.ErrorCodeOverride == nil {
return "BucketAlreadyOwnedByYou"
}
return *e.ErrorCodeOverride
}
func (e *BucketAlreadyOwnedByYou) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Object is archived and inaccessible until restored.
type InvalidObjectState struct {
Message *string
ErrorCodeOverride *string
StorageClass StorageClass
AccessTier IntelligentTieringAccessTier
@ -69,13 +85,20 @@ func (e *InvalidObjectState) ErrorMessage() string {
}
return *e.Message
}
func (e *InvalidObjectState) ErrorCode() string { return "InvalidObjectState" }
func (e *InvalidObjectState) ErrorCode() string {
if e.ErrorCodeOverride == nil {
return "InvalidObjectState"
}
return *e.ErrorCodeOverride
}
func (e *InvalidObjectState) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified bucket does not exist.
type NoSuchBucket struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
@ -88,13 +111,20 @@ func (e *NoSuchBucket) ErrorMessage() string {
}
return *e.Message
}
func (e *NoSuchBucket) ErrorCode() string { return "NoSuchBucket" }
func (e *NoSuchBucket) ErrorCode() string {
if e.ErrorCodeOverride == nil {
return "NoSuchBucket"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchBucket) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified key does not exist.
type NoSuchKey struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
@ -107,13 +137,20 @@ func (e *NoSuchKey) ErrorMessage() string {
}
return *e.Message
}
func (e *NoSuchKey) ErrorCode() string { return "NoSuchKey" }
func (e *NoSuchKey) ErrorCode() string {
if e.ErrorCodeOverride == nil {
return "NoSuchKey"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchKey) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified multipart upload does not exist.
type NoSuchUpload struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
@ -126,13 +163,20 @@ func (e *NoSuchUpload) ErrorMessage() string {
}
return *e.Message
}
func (e *NoSuchUpload) ErrorCode() string { return "NoSuchUpload" }
func (e *NoSuchUpload) ErrorCode() string {
if e.ErrorCodeOverride == nil {
return "NoSuchUpload"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchUpload) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified content does not exist.
type NotFound struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
@ -145,13 +189,20 @@ func (e *NotFound) ErrorMessage() string {
}
return *e.Message
}
func (e *NotFound) ErrorCode() string { return "NotFound" }
func (e *NotFound) ErrorCode() string {
if e.ErrorCodeOverride == nil {
return "NotFound"
}
return *e.ErrorCodeOverride
}
func (e *NotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// This action is not allowed against this storage tier.
type ObjectAlreadyInActiveTierError struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
@ -164,7 +215,12 @@ func (e *ObjectAlreadyInActiveTierError) ErrorMessage() string {
}
return *e.Message
}
func (e *ObjectAlreadyInActiveTierError) ErrorCode() string { return "ObjectAlreadyInActiveTierError" }
func (e *ObjectAlreadyInActiveTierError) ErrorCode() string {
if e.ErrorCodeOverride == nil {
return "ObjectAlreadyInActiveTierError"
}
return *e.ErrorCodeOverride
}
func (e *ObjectAlreadyInActiveTierError) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The source object of the COPY action is not in the active tier and is only
@ -172,6 +228,8 @@ func (e *ObjectAlreadyInActiveTierError) ErrorFault() smithy.ErrorFault { return
type ObjectNotInActiveTierError struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
@ -184,5 +242,10 @@ func (e *ObjectNotInActiveTierError) ErrorMessage() string {
}
return *e.Message
}
func (e *ObjectNotInActiveTierError) ErrorCode() string { return "ObjectNotInActiveTierError" }
func (e *ObjectNotInActiveTierError) ErrorCode() string {
if e.ErrorCodeOverride == nil {
return "ObjectNotInActiveTierError"
}
return *e.ErrorCodeOverride
}
func (e *ObjectNotInActiveTierError) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }

View File

@ -114,9 +114,10 @@ type AnalyticsExportDestination struct {
// filter is provided, all objects will be considered in any analysis.
//
// The following types satisfy this interface:
// AnalyticsFilterMemberAnd
// AnalyticsFilterMemberPrefix
// AnalyticsFilterMemberTag
//
// AnalyticsFilterMemberAnd
// AnalyticsFilterMemberPrefix
// AnalyticsFilterMemberTag
type AnalyticsFilter interface {
isAnalyticsFilter()
}
@ -349,7 +350,6 @@ type Condition struct {
noSmithyDocumentSerde
}
//
type ContinuationEvent struct {
noSmithyDocumentSerde
}
@ -2283,11 +2283,12 @@ type LifecycleRuleAndOperator struct {
// Filter must have exactly one of Prefix, Tag, or And specified.
//
// The following types satisfy this interface:
// LifecycleRuleFilterMemberAnd
// LifecycleRuleFilterMemberObjectSizeGreaterThan
// LifecycleRuleFilterMemberObjectSizeLessThan
// LifecycleRuleFilterMemberPrefix
// LifecycleRuleFilterMemberTag
//
// LifecycleRuleFilterMemberAnd
// LifecycleRuleFilterMemberObjectSizeGreaterThan
// LifecycleRuleFilterMemberObjectSizeLessThan
// LifecycleRuleFilterMemberPrefix
// LifecycleRuleFilterMemberTag
type LifecycleRuleFilter interface {
isLifecycleRuleFilter()
}
@ -2449,10 +2450,11 @@ type MetricsConfiguration struct {
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html).
//
// The following types satisfy this interface:
// MetricsFilterMemberAccessPointArn
// MetricsFilterMemberAnd
// MetricsFilterMemberPrefix
// MetricsFilterMemberTag
//
// MetricsFilterMemberAccessPointArn
// MetricsFilterMemberAnd
// MetricsFilterMemberPrefix
// MetricsFilterMemberTag
type MetricsFilter interface {
isMetricsFilter()
}
@ -3234,9 +3236,10 @@ type ReplicationRuleAndOperator struct {
// applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
//
// The following types satisfy this interface:
// ReplicationRuleFilterMemberAnd
// ReplicationRuleFilterMemberPrefix
// ReplicationRuleFilterMemberTag
//
// ReplicationRuleFilterMemberAnd
// ReplicationRuleFilterMemberPrefix
// ReplicationRuleFilterMemberTag
type ReplicationRuleFilter interface {
isReplicationRuleFilter()
}
@ -3452,11 +3455,12 @@ type ScanRange struct {
// The container for selecting objects from a content event stream.
//
// The following types satisfy this interface:
// SelectObjectContentEventStreamMemberCont
// SelectObjectContentEventStreamMemberEnd
// SelectObjectContentEventStreamMemberProgress
// SelectObjectContentEventStreamMemberRecords
// SelectObjectContentEventStreamMemberStats
//
// SelectObjectContentEventStreamMemberCont
// SelectObjectContentEventStreamMemberEnd
// SelectObjectContentEventStreamMemberProgress
// SelectObjectContentEventStreamMemberRecords
// SelectObjectContentEventStreamMemberStats
type SelectObjectContentEventStream interface {
isSelectObjectContentEventStream()
}

View File

@ -1,3 +1,21 @@
# Release (2022-12-02)
* No change notes available for this release.
# Release (2022-10-24)
## Module Highlights
* `github.com/aws/smithy-go`: v1.13.4
* **Bug Fix**: fixed document type checking for encoding nested types
# Release (2022-09-14)
* No change notes available for this release.
# Release (v1.13.2)
* No change notes available for this release.
# Release (v1.13.1)
* No change notes available for this release.

View File

@ -14,6 +14,9 @@ REPOTOOLS_CMD_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION}
REPOTOOLS_CMD_TAG_RELEASE = ${REPOTOOLS_MODULE}/cmd/tagrelease@${REPOTOOLS_VERSION}
REPOTOOLS_CMD_MODULE_VERSION = ${REPOTOOLS_MODULE}/cmd/moduleversion@${REPOTOOLS_VERSION}
UNIT_TEST_TAGS=
BUILD_TAGS=
ifneq ($(PRE_RELEASE_VERSION),)
REPOTOOLS_CMD_CALCULATE_RELEASE_ADDITIONAL_ARGS += -preview=${PRE_RELEASE_VERSION}
endif
@ -27,6 +30,37 @@ smithy-build:
smithy-clean:
cd codegen && ./gradlew clean
##################
# Linting/Verify #
##################
.PHONY: verify vet
verify: vet
vet:
go vet ${BUILD_TAGS} --all ./...
################
# Unit Testing #
################
.PHONY: unit unit-race unit-test unit-race-test
unit: verify
go vet ${BUILD_TAGS} --all ./... && \
go test ${BUILD_TAGS} ${RUN_NONE} ./... && \
go test -timeout=1m ${UNIT_TEST_TAGS} ./...
unit-race: verify
go vet ${BUILD_TAGS} --all ./... && \
go test ${BUILD_TAGS} ${RUN_NONE} ./... && \
go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./...
unit-test: verify
go test -timeout=1m ${UNIT_TEST_TAGS} ./...
unit-race-test: verify
go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./...
#####################
# Release Process #
#####################

View File

@ -2,7 +2,7 @@
[![Go Build Status](https://github.com/aws/smithy-go/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/go.yml)[![Codegen Build Status](https://github.com/aws/smithy-go/actions/workflows/codegen.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/codegen.yml)
Smithy code generators for Go.
[Smithy](https://smithy.io/) code generators for Go.
**WARNING: All interfaces are subject to change.**

3
vendor/github.com/aws/smithy-go/auth/bearer/docs.go generated vendored Normal file
View File

@ -0,0 +1,3 @@
// Package bearer provides middleware and utilities for authenticating API
// operation calls with a Bearer Token.
package bearer

View File

@ -0,0 +1,104 @@
package bearer
import (
"context"
"fmt"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Message is the middleware stack's request transport message value.
type Message interface{}
// Signer provides an interface for implementations to decorate a request
// message with a bearer token. The signer is responsible for validating the
// message type is compatible with the signer.
type Signer interface {
SignWithBearerToken(context.Context, Token, Message) (Message, error)
}
// AuthenticationMiddleware provides the Finalize middleware step for signing
// an request message with a bearer token.
type AuthenticationMiddleware struct {
signer Signer
tokenProvider TokenProvider
}
// AddAuthenticationMiddleware helper adds the AuthenticationMiddleware to the
// middleware Stack in the Finalize step with the options provided.
func AddAuthenticationMiddleware(s *middleware.Stack, signer Signer, tokenProvider TokenProvider) error {
return s.Finalize.Add(
NewAuthenticationMiddleware(signer, tokenProvider),
middleware.After,
)
}
// NewAuthenticationMiddleware returns an initialized AuthenticationMiddleware.
func NewAuthenticationMiddleware(signer Signer, tokenProvider TokenProvider) *AuthenticationMiddleware {
return &AuthenticationMiddleware{
signer: signer,
tokenProvider: tokenProvider,
}
}
const authenticationMiddlewareID = "BearerTokenAuthentication"
// ID returns the resolver identifier
func (m *AuthenticationMiddleware) ID() string {
return authenticationMiddlewareID
}
// HandleFinalize implements the FinalizeMiddleware interface in order to
// update the request with bearer token authentication.
func (m *AuthenticationMiddleware) HandleFinalize(
ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
token, err := m.tokenProvider.RetrieveBearerToken(ctx)
if err != nil {
return out, metadata, fmt.Errorf("failed AuthenticationMiddleware wrap message, %w", err)
}
signedMessage, err := m.signer.SignWithBearerToken(ctx, token, in.Request)
if err != nil {
return out, metadata, fmt.Errorf("failed AuthenticationMiddleware sign message, %w", err)
}
in.Request = signedMessage
return next.HandleFinalize(ctx, in)
}
// SignHTTPSMessage provides a bearer token authentication implementation that
// will sign the message with the provided bearer token.
//
// Will fail if the message is not a smithy-go HTTP request or the request is
// not HTTPS.
type SignHTTPSMessage struct{}
// NewSignHTTPSMessage returns an initialized signer for HTTP messages.
func NewSignHTTPSMessage() *SignHTTPSMessage {
return &SignHTTPSMessage{}
}
// SignWithBearerToken returns a copy of the HTTP request with the bearer token
// added via the "Authorization" header, per RFC 6750, https://datatracker.ietf.org/doc/html/rfc6750.
//
// Returns an error if the request's URL scheme is not HTTPS, or the request
// message is not an smithy-go HTTP Request pointer type.
func (SignHTTPSMessage) SignWithBearerToken(ctx context.Context, token Token, message Message) (Message, error) {
req, ok := message.(*smithyhttp.Request)
if !ok {
return nil, fmt.Errorf("expect smithy-go HTTP Request, got %T", message)
}
if !req.IsHTTPS() {
return nil, fmt.Errorf("bearer token with HTTP request requires HTTPS")
}
reqClone := req.Clone()
reqClone.Header.Set("Authorization", "Bearer "+token.Value)
return reqClone, nil
}

50
vendor/github.com/aws/smithy-go/auth/bearer/token.go generated vendored Normal file
View File

@ -0,0 +1,50 @@
package bearer
import (
"context"
"time"
)
// Token provides a type wrapping a bearer token and expiration metadata.
type Token struct {
Value string
CanExpire bool
Expires time.Time
}
// Expired returns if the token's Expires time is before or equal to the time
// provided. If CanExpires is false, Expired will always return false.
func (t Token) Expired(now time.Time) bool {
if !t.CanExpire {
return false
}
now = now.Round(0)
return now.Equal(t.Expires) || now.After(t.Expires)
}
// TokenProvider provides interface for retrieving bearer tokens.
type TokenProvider interface {
RetrieveBearerToken(context.Context) (Token, error)
}
// TokenProviderFunc provides a helper utility to wrap a function as a type
// that implements the TokenProvider interface.
type TokenProviderFunc func(context.Context) (Token, error)
// RetrieveBearerToken calls the wrapped function, returning the Token or
// error.
func (fn TokenProviderFunc) RetrieveBearerToken(ctx context.Context) (Token, error) {
return fn(ctx)
}
// StaticTokenProvider provides a utility for wrapping a static bearer token
// value within an implementation of a token provider.
type StaticTokenProvider struct {
Token Token
}
// RetrieveBearerToken returns the static token specified.
func (s StaticTokenProvider) RetrieveBearerToken(context.Context) (Token, error) {
return s.Token, nil
}

View File

@ -0,0 +1,208 @@
package bearer
import (
"context"
"fmt"
"sync/atomic"
"time"
smithycontext "github.com/aws/smithy-go/context"
"github.com/aws/smithy-go/internal/sync/singleflight"
)
// package variable that can be override in unit tests.
var timeNow = time.Now
// TokenCacheOptions provides a set of optional configuration options for the
// TokenCache TokenProvider.
type TokenCacheOptions struct {
// The duration before the token will expire when the credentials will be
// refreshed. If DisableAsyncRefresh is true, the RetrieveBearerToken calls
// will be blocking.
//
// Asynchronous refreshes are deduplicated, and only one will be in-flight
// at a time. If the token expires while an asynchronous refresh is in
// flight, the next call to RetrieveBearerToken will block on that refresh
// to return.
RefreshBeforeExpires time.Duration
// The timeout the underlying TokenProvider's RetrieveBearerToken call must
// return within, or will be canceled. Defaults to 0, no timeout.
//
// If 0 timeout, its possible for the underlying tokenProvider's
// RetrieveBearerToken call to block forever. Preventing subsequent
// TokenCache attempts to refresh the token.
//
// If this timeout is reached all pending deduplicated calls to
// TokenCache RetrieveBearerToken will fail with an error.
RetrieveBearerTokenTimeout time.Duration
// The minimum duration between asynchronous refresh attempts. If the next
// asynchronous recent refresh attempt was within the minimum delay
// duration, the call to retrieve will return the current cached token, if
// not expired.
//
// The asynchronous retrieve is deduplicated across multiple calls when
// RetrieveBearerToken is called. The asynchronous retrieve is not a
// periodic task. It is only performed when the token has not yet expired,
// and the current item is within the RefreshBeforeExpires window, and the
// TokenCache's RetrieveBearerToken method is called.
//
// If 0, (default) there will be no minimum delay between asynchronous
// refresh attempts.
//
// If DisableAsyncRefresh is true, this option is ignored.
AsyncRefreshMinimumDelay time.Duration
// Sets if the TokenCache will attempt to refresh the token in the
// background asynchronously instead of blocking for credentials to be
// refreshed. If disabled token refresh will be blocking.
//
// The first call to RetrieveBearerToken will always be blocking, because
// there is no cached token.
DisableAsyncRefresh bool
}
// TokenCache provides an utility to cache Bearer Authentication tokens from a
// wrapped TokenProvider. The TokenCache can be has options to configure the
// cache's early and asynchronous refresh of the token.
type TokenCache struct {
options TokenCacheOptions
provider TokenProvider
cachedToken atomic.Value
lastRefreshAttemptTime atomic.Value
sfGroup singleflight.Group
}
// NewTokenCache returns a initialized TokenCache that implements the
// TokenProvider interface. Wrapping the provider passed in. Also taking a set
// of optional functional option parameters to configure the token cache.
func NewTokenCache(provider TokenProvider, optFns ...func(*TokenCacheOptions)) *TokenCache {
var options TokenCacheOptions
for _, fn := range optFns {
fn(&options)
}
return &TokenCache{
options: options,
provider: provider,
}
}
// RetrieveBearerToken returns the token if it could be obtained, or error if a
// valid token could not be retrieved.
//
// The passed in Context's cancel/deadline/timeout will impacting only this
// individual retrieve call and not any other already queued up calls. This
// means underlying provider's RetrieveBearerToken calls could block for ever,
// and not be canceled with the Context. Set RetrieveBearerTokenTimeout to
// provide a timeout, preventing the underlying TokenProvider blocking forever.
//
// By default, if the passed in Context is canceled, all of its values will be
// considered expired. The wrapped TokenProvider will not be able to lookup the
// values from the Context once it is expired. This is done to protect against
// expired values no longer being valid. To disable this behavior, use
// smithy-go's context.WithPreserveExpiredValues to add a value to the Context
// before calling RetrieveBearerToken to enable support for expired values.
//
// Without RetrieveBearerTokenTimeout there is the potential for a underlying
// Provider's RetrieveBearerToken call to sit forever. Blocking in subsequent
// attempts at refreshing the token.
func (p *TokenCache) RetrieveBearerToken(ctx context.Context) (Token, error) {
cachedToken, ok := p.getCachedToken()
if !ok || cachedToken.Expired(timeNow()) {
return p.refreshBearerToken(ctx)
}
// Check if the token should be refreshed before it expires.
refreshToken := cachedToken.Expired(timeNow().Add(p.options.RefreshBeforeExpires))
if !refreshToken {
return cachedToken, nil
}
if p.options.DisableAsyncRefresh {
return p.refreshBearerToken(ctx)
}
p.tryAsyncRefresh(ctx)
return cachedToken, nil
}
// tryAsyncRefresh attempts to asynchronously refresh the token returning the
// already cached token. If it AsyncRefreshMinimumDelay option is not zero, and
// the duration since the last refresh is less than that value, nothing will be
// done.
func (p *TokenCache) tryAsyncRefresh(ctx context.Context) {
if p.options.AsyncRefreshMinimumDelay != 0 {
var lastRefreshAttempt time.Time
if v := p.lastRefreshAttemptTime.Load(); v != nil {
lastRefreshAttempt = v.(time.Time)
}
if timeNow().Before(lastRefreshAttempt.Add(p.options.AsyncRefreshMinimumDelay)) {
return
}
}
// Ignore the returned channel so this won't be blocking, and limit the
// number of additional goroutines created.
p.sfGroup.DoChan("async-refresh", func() (interface{}, error) {
res, err := p.refreshBearerToken(ctx)
if p.options.AsyncRefreshMinimumDelay != 0 {
var refreshAttempt time.Time
if err != nil {
refreshAttempt = timeNow()
}
p.lastRefreshAttemptTime.Store(refreshAttempt)
}
return res, err
})
}
func (p *TokenCache) refreshBearerToken(ctx context.Context) (Token, error) {
resCh := p.sfGroup.DoChan("refresh-token", func() (interface{}, error) {
ctx := smithycontext.WithSuppressCancel(ctx)
if v := p.options.RetrieveBearerTokenTimeout; v != 0 {
var cancel func()
ctx, cancel = context.WithTimeout(ctx, v)
defer cancel()
}
return p.singleRetrieve(ctx)
})
select {
case res := <-resCh:
return res.Val.(Token), res.Err
case <-ctx.Done():
return Token{}, fmt.Errorf("retrieve bearer token canceled, %w", ctx.Err())
}
}
func (p *TokenCache) singleRetrieve(ctx context.Context) (interface{}, error) {
token, err := p.provider.RetrieveBearerToken(ctx)
if err != nil {
return Token{}, fmt.Errorf("failed to retrieve bearer token, %w", err)
}
p.cachedToken.Store(&token)
return token, nil
}
// getCachedToken returns the currently cached token and true if found. Returns
// false if no token is cached.
func (p *TokenCache) getCachedToken() (Token, bool) {
v := p.cachedToken.Load()
if v == nil {
return Token{}, false
}
t := v.(*Token)
if t == nil || t.Value == "" {
return Token{}, false
}
return *t, true
}

View File

@ -0,0 +1,81 @@
package context
import "context"
// valueOnlyContext provides a utility to preserve only the values of a
// Context. Suppressing any cancellation or deadline on that context being
// propagated downstream of this value.
//
// If preserveExpiredValues is false (default), and the valueCtx is canceled,
// calls to lookup values with the Values method, will always return nil. Setting
// preserveExpiredValues to true, will allow the valueOnlyContext to lookup
// values in valueCtx even if valueCtx is canceled.
//
// Based on the Go standard libraries net/lookup.go onlyValuesCtx utility.
// https://github.com/golang/go/blob/da2773fe3e2f6106634673a38dc3a6eb875fe7d8/src/net/lookup.go
type valueOnlyContext struct {
context.Context
preserveExpiredValues bool
valuesCtx context.Context
}
var _ context.Context = (*valueOnlyContext)(nil)
// Value looks up the key, returning its value. If configured to not preserve
// values of expired context, and the wrapping context is canceled, nil will be
// returned.
func (v *valueOnlyContext) Value(key interface{}) interface{} {
if !v.preserveExpiredValues {
select {
case <-v.valuesCtx.Done():
return nil
default:
}
}
return v.valuesCtx.Value(key)
}
// WithSuppressCancel wraps the Context value, suppressing its deadline and
// cancellation events being propagated downstream to consumer of the returned
// context.
//
// By default the wrapped Context's Values are available downstream until the
// wrapped Context is canceled. Once the wrapped Context is canceled, Values
// method called on the context return will no longer lookup any key. As they
// are now considered expired.
//
// To override this behavior, use WithPreserveExpiredValues on the Context
// before it is wrapped by WithSuppressCancel. This will make the Context
// returned by WithSuppressCancel allow lookup of expired values.
func WithSuppressCancel(ctx context.Context) context.Context {
return &valueOnlyContext{
Context: context.Background(),
valuesCtx: ctx,
preserveExpiredValues: GetPreserveExpiredValues(ctx),
}
}
type preserveExpiredValuesKey struct{}
// WithPreserveExpiredValues adds a Value to the Context if expired values
// should be preserved, and looked up by a Context wrapped by
// WithSuppressCancel.
//
// WithPreserveExpiredValues must be added as a value to a Context, before that
// Context is wrapped by WithSuppressCancel
func WithPreserveExpiredValues(ctx context.Context, enable bool) context.Context {
return context.WithValue(ctx, preserveExpiredValuesKey{}, enable)
}
// GetPreserveExpiredValues looks up, and returns the PreserveExpressValues
// value in the context. Returning true if enabled, false otherwise.
func GetPreserveExpiredValues(ctx context.Context) bool {
v := ctx.Value(preserveExpiredValuesKey{})
if v != nil {
return v.(bool)
}
return false
}

View File

@ -2,7 +2,7 @@
Package xml holds the XMl encoder utility. This utility is written in accordance to our design to delegate to
shape serializer function in which a xml.Value will be passed around.
Resources followed: https://awslabs.github.io/smithy/1.0/spec/core/xml-traits.html#
Resources followed: https://smithy.io/2.0/spec/protocol-traits.html#xml-bindings
Member Element

View File

@ -3,4 +3,4 @@
package smithy
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.13.1"
const goModuleVersion = "1.13.5"

View File

@ -0,0 +1,28 @@
Copyright (c) 2009 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -0,0 +1,8 @@
// Package singleflight provides a duplicate function call suppression
// mechanism. This package is a fork of the Go golang.org/x/sync/singleflight
// package. The package is forked, because the package a part of the unstable
// and unversioned golang.org/x/sync module.
//
// https://github.com/golang/sync/tree/67f06af15bc961c363a7260195bcd53487529a21/singleflight
package singleflight

View File

@ -0,0 +1,210 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package singleflight
import (
"bytes"
"errors"
"fmt"
"runtime"
"runtime/debug"
"sync"
)
// errGoexit indicates the runtime.Goexit was called in
// the user given function.
var errGoexit = errors.New("runtime.Goexit was called")
// A panicError is an arbitrary value recovered from a panic
// with the stack trace during the execution of given function.
type panicError struct {
value interface{}
stack []byte
}
// Error implements error interface.
func (p *panicError) Error() string {
return fmt.Sprintf("%v\n\n%s", p.value, p.stack)
}
func newPanicError(v interface{}) error {
stack := debug.Stack()
// The first line of the stack trace is of the form "goroutine N [status]:"
// but by the time the panic reaches Do the goroutine may no longer exist
// and its status will have changed. Trim out the misleading line.
if line := bytes.IndexByte(stack[:], '\n'); line >= 0 {
stack = stack[line+1:]
}
return &panicError{value: v, stack: stack}
}
// call is an in-flight or completed singleflight.Do call
type call struct {
wg sync.WaitGroup
// These fields are written once before the WaitGroup is done
// and are only read after the WaitGroup is done.
val interface{}
err error
// forgotten indicates whether Forget was called with this call's key
// while the call was still in flight.
forgotten bool
// These fields are read and written with the singleflight
// mutex held before the WaitGroup is done, and are read but
// not written after the WaitGroup is done.
dups int
chans []chan<- Result
}
// Group represents a class of work and forms a namespace in
// which units of work can be executed with duplicate suppression.
type Group struct {
mu sync.Mutex // protects m
m map[string]*call // lazily initialized
}
// Result holds the results of Do, so they can be passed
// on a channel.
type Result struct {
Val interface{}
Err error
Shared bool
}
// Do executes and returns the results of the given function, making
// sure that only one execution is in-flight for a given key at a
// time. If a duplicate comes in, the duplicate caller waits for the
// original to complete and receives the same results.
// The return value shared indicates whether v was given to multiple callers.
func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, err error, shared bool) {
g.mu.Lock()
if g.m == nil {
g.m = make(map[string]*call)
}
if c, ok := g.m[key]; ok {
c.dups++
g.mu.Unlock()
c.wg.Wait()
if e, ok := c.err.(*panicError); ok {
panic(e)
} else if c.err == errGoexit {
runtime.Goexit()
}
return c.val, c.err, true
}
c := new(call)
c.wg.Add(1)
g.m[key] = c
g.mu.Unlock()
g.doCall(c, key, fn)
return c.val, c.err, c.dups > 0
}
// DoChan is like Do but returns a channel that will receive the
// results when they are ready.
//
// The returned channel will not be closed.
func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result {
ch := make(chan Result, 1)
g.mu.Lock()
if g.m == nil {
g.m = make(map[string]*call)
}
if c, ok := g.m[key]; ok {
c.dups++
c.chans = append(c.chans, ch)
g.mu.Unlock()
return ch
}
c := &call{chans: []chan<- Result{ch}}
c.wg.Add(1)
g.m[key] = c
g.mu.Unlock()
go g.doCall(c, key, fn)
return ch
}
// doCall handles the single call for a key.
func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) {
normalReturn := false
recovered := false
// use double-defer to distinguish panic from runtime.Goexit,
// more details see https://golang.org/cl/134395
defer func() {
// the given function invoked runtime.Goexit
if !normalReturn && !recovered {
c.err = errGoexit
}
c.wg.Done()
g.mu.Lock()
defer g.mu.Unlock()
if !c.forgotten {
delete(g.m, key)
}
if e, ok := c.err.(*panicError); ok {
// In order to prevent the waiting channels from being blocked forever,
// needs to ensure that this panic cannot be recovered.
if len(c.chans) > 0 {
go panic(e)
select {} // Keep this goroutine around so that it will appear in the crash dump.
} else {
panic(e)
}
} else if c.err == errGoexit {
// Already in the process of goexit, no need to call again
} else {
// Normal return
for _, ch := range c.chans {
ch <- Result{c.val, c.err, c.dups > 0}
}
}
}()
func() {
defer func() {
if !normalReturn {
// Ideally, we would wait to take a stack trace until we've determined
// whether this is a panic or a runtime.Goexit.
//
// Unfortunately, the only way we can distinguish the two is to see
// whether the recover stopped the goroutine from terminating, and by
// the time we know that, the part of the stack trace relevant to the
// panic has been discarded.
if r := recover(); r != nil {
c.err = newPanicError(r)
}
}
}()
c.val, c.err = fn()
normalReturn = true
}()
if !normalReturn {
recovered = true
}
}
// Forget tells the singleflight to forget about a key. Future calls
// to Do for this key will call the function rather than waiting for
// an earlier call to complete.
func (g *Group) Forget(key string) {
g.mu.Lock()
if c, ok := g.m[key]; ok {
c.forgotten = true
}
delete(g.m, key)
g.mu.Unlock()
}

11
vendor/github.com/aws/smithy-go/modman.toml generated vendored Normal file
View File

@ -0,0 +1,11 @@
[dependencies]
"github.com/google/go-cmp" = "v0.5.8"
"github.com/jmespath/go-jmespath" = "v0.4.0"
[modules]
[modules.codegen]
no_tag = true
[modules."codegen/smithy-go-codegen/build/test-generated/go/internal/testmodule"]
no_tag = true

25
vendor/modules.txt vendored
View File

@ -1,4 +1,4 @@
# github.com/aws/aws-sdk-go-v2 v1.16.11
# github.com/aws/aws-sdk-go-v2 v1.17.3
## explicit; go 1.15
github.com/aws/aws-sdk-go-v2
github.com/aws/aws-sdk-go-v2/aws
@ -19,7 +19,7 @@ github.com/aws/aws-sdk-go-v2/internal/sdkio
github.com/aws/aws-sdk-go-v2/internal/strings
github.com/aws/aws-sdk-go-v2/internal/sync/singleflight
github.com/aws/aws-sdk-go-v2/internal/timeconv
# github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.3
# github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10
## explicit; go 1.15
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi
@ -39,35 +39,35 @@ github.com/aws/aws-sdk-go-v2/credentials/stscreds
## explicit; go 1.15
github.com/aws/aws-sdk-go-v2/feature/ec2/imds
github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config
# github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18
# github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27
## explicit; go 1.15
github.com/aws/aws-sdk-go-v2/internal/configsources
# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12
# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21
## explicit; go 1.15
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2
# github.com/aws/aws-sdk-go-v2/internal/ini v1.3.19
## explicit; go 1.15
github.com/aws/aws-sdk-go-v2/internal/ini
# github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.5
# github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.18
## explicit; go 1.15
github.com/aws/aws-sdk-go-v2/internal/v4a
github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto
github.com/aws/aws-sdk-go-v2/internal/v4a/internal/v4
# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.3
# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11
## explicit; go 1.15
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding
# github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.9
# github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.22
## explicit; go 1.15
github.com/aws/aws-sdk-go-v2/service/internal/checksum
# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12
# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.21
## explicit; go 1.15
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url
# github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.8
# github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.21
## explicit; go 1.15
github.com/aws/aws-sdk-go-v2/service/internal/s3shared
github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn
github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config
# github.com/aws/aws-sdk-go-v2/service/s3 v1.27.1
# github.com/aws/aws-sdk-go-v2/service/s3 v1.30.0
## explicit; go 1.15
github.com/aws/aws-sdk-go-v2/service/s3
github.com/aws/aws-sdk-go-v2/service/s3/internal/arn
@ -84,13 +84,16 @@ github.com/aws/aws-sdk-go-v2/service/sso/types
github.com/aws/aws-sdk-go-v2/service/sts
github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints
github.com/aws/aws-sdk-go-v2/service/sts/types
# github.com/aws/smithy-go v1.13.1
# github.com/aws/smithy-go v1.13.5
## explicit; go 1.15
github.com/aws/smithy-go
github.com/aws/smithy-go/auth/bearer
github.com/aws/smithy-go/context
github.com/aws/smithy-go/document
github.com/aws/smithy-go/encoding
github.com/aws/smithy-go/encoding/httpbinding
github.com/aws/smithy-go/encoding/xml
github.com/aws/smithy-go/internal/sync/singleflight
github.com/aws/smithy-go/io
github.com/aws/smithy-go/logging
github.com/aws/smithy-go/middleware