From 73cdc0fa1072fcd05d35970938cb0f60570eae13 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 15:03:20 +0000 Subject: [PATCH] fix(deps): update patch updates --- go.mod | 66 +- go.sum | 132 +- oci/Containerfile | 2 +- tools/go.mod | 16 +- tools/go.sum | 32 +- .../charm.land/lipgloss/v2/.golangci.yml | 3 + .../vendor/charm.land/lipgloss/v2/position.go | 4 +- tools/vendor/charm.land/lipgloss/v2/wrap.go | 6 + .../dlclark/regexp2/v2/syntax/charclass.go | 32 +- .../nonamedreturns/analyzer/analyzer.go | 94 +- tools/vendor/golang.org/x/mod/modfile/read.go | 8 +- tools/vendor/golang.org/x/mod/modfile/rule.go | 65 +- .../golang.org/x/sync/errgroup/errgroup.go | 2 +- .../golang.org/x/sync/semaphore/semaphore.go | 10 +- .../golang.org/x/sys/unix/ztypes_linux.go | 76 + .../golang.org/x/sys/unix/ztypes_linux_386.go | 4 + .../x/sys/unix/ztypes_linux_amd64.go | 4 + .../golang.org/x/sys/unix/ztypes_linux_arm.go | 4 + .../x/sys/unix/ztypes_linux_arm64.go | 4 + .../x/sys/unix/ztypes_linux_loong64.go | 4 + .../x/sys/unix/ztypes_linux_mips.go | 4 + .../x/sys/unix/ztypes_linux_mips64.go | 4 + .../x/sys/unix/ztypes_linux_mips64le.go | 4 + .../x/sys/unix/ztypes_linux_mipsle.go | 4 + .../golang.org/x/sys/unix/ztypes_linux_ppc.go | 4 + .../x/sys/unix/ztypes_linux_ppc64.go | 4 + .../x/sys/unix/ztypes_linux_ppc64le.go | 4 + .../x/sys/unix/ztypes_linux_riscv64.go | 4 + .../x/sys/unix/ztypes_linux_s390x.go | 4 + .../x/sys/unix/ztypes_linux_sparc64.go | 4 + .../go/analysis/passes/composite/composite.go | 142 +- .../go/analysis/passes/errorsas/errorsas.go | 2 +- .../x/tools/go/analysis/passes/inline/doc.go | 37 +- .../tools/go/analysis/passes/inline/inline.go | 56 +- .../go/analysis/passes/modernize/embedlit.go | 418 +++- .../analysis/passes/modernize/errorsastype.go | 124 +- .../go/analysis/passes/modernize/modernize.go | 15 +- .../passes/modernize/slicesbackward.go | 7 +- .../passes/modernize/slicescontains.go | 14 +- .../passes/modernize/stringscutprefix.go | 58 +- .../analysis/passes/modernize/unsafefuncs.go | 7 +- .../tools/go/analysis/passes/printf/printf.go | 7 +- .../golang.org/x/tools/go/callgraph/util.go | 1 + .../x/tools/go/packages/packages.go | 14 + .../golang.org/x/tools/go/ssa/builder.go | 39 +- .../golang.org/x/tools/go/ssa/create.go | 33 +- .../vendor/golang.org/x/tools/go/ssa/emit.go | 2 +- .../golang.org/x/tools/go/ssa/instantiate.go | 57 +- .../golang.org/x/tools/go/ssa/methods.go | 23 +- .../golang.org/x/tools/go/ssa/sanity.go | 8 +- tools/vendor/golang.org/x/tools/go/ssa/ssa.go | 109 +- .../x/tools/go/ssa/ssautil/visit.go | 13 +- .../vendor/golang.org/x/tools/go/ssa/subst.go | 18 +- .../golang.org/x/tools/go/ssa/wrappers.go | 42 +- .../x/tools/internal/gcimporter/iexport.go | 3 + .../x/tools/internal/gcimporter/iimport.go | 26 +- .../x/tools/internal/goplsexport/export.go | 20 - .../x/tools/internal/imports/fix.go | 1 - .../x/tools/internal/imports/imports.go | 4 + .../x/tools/internal/refactor/delete.go | 2 +- .../x/tools/internal/typesinternal/element.go | 8 +- .../x/tools/internal/typesinternal/types.go | 28 + .../x/tools/refactor/satisfy/find.go | 176 +- tools/vendor/modules.txt | 19 +- .../common/version.go | 2 +- .../aws-sdk-go-v2/aws/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/aws/retry/jitter_backoff.go | 77 +- .../aws/aws-sdk-go-v2/aws/retry/middleware.go | 61 +- .../aws/aws-sdk-go-v2/aws/retry/retry.go | 13 + .../aws/aws-sdk-go-v2/aws/retry/standard.go | 108 +- .../aws/aws-sdk-go-v2/config/CHANGELOG.md | 21 + .../config/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/credentials/CHANGELOG.md | 21 + .../credentials/go_module_metadata.go | 2 +- .../feature/ec2/imds/CHANGELOG.md | 17 + .../feature/ec2/imds/go_module_metadata.go | 2 +- .../internal/configsources/CHANGELOG.md | 4 + .../configsources/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/internal/context/context.go | 13 + .../internal/endpoints/v2/CHANGELOG.md | 4 + .../endpoints/v2/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/internal/v4a/CHANGELOG.md | 4 + .../internal/v4a/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/service/iam/CHANGELOG.md | 8 + .../api_op_CreateServiceSpecificCredential.go | 27 +- .../api_op_ListServiceSpecificCredentials.go | 15 +- .../service/iam/go_module_metadata.go | 2 +- .../service/internal/checksum/CHANGELOG.md | 4 + .../internal/checksum/go_module_metadata.go | 2 +- .../internal/presigned-url/CHANGELOG.md | 4 + .../presigned-url/go_module_metadata.go | 2 +- .../service/internal/s3shared/CHANGELOG.md | 4 + .../internal/s3shared/go_module_metadata.go | 2 +- .../service/pricing/CHANGELOG.md | 21 + .../service/pricing/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/service/signin/CHANGELOG.md | 21 + .../service/signin/api_client.go | 16 + .../signin/api_op_CreateOAuth2Token.go | 6 + ...DeleteConsoleAuthorizationConfiguration.go | 168 ++ ...pi_op_DeleteResourcePermissionStatement.go | 196 ++ ...op_GetConsoleAuthorizationConfiguration.go | 168 ++ .../signin/api_op_GetResourcePolicy.go | 155 ++ ...api_op_ListResourcePermissionStatements.go | 261 +++ ...op_PutConsoleAuthorizationConfiguration.go | 168 ++ .../api_op_PutResourcePermissionStatement.go | 216 ++ .../service/signin/deserializers.go | 2001 ++++++++++++++++- .../aws-sdk-go-v2/service/signin/endpoints.go | 291 ++- .../service/signin/generated.json | 7 + .../service/signin/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/service/signin/options.go | 4 + .../service/signin/serializers.go | 589 +++++ .../service/signin/types/enums.go | 9 + .../service/signin/types/errors.go | 96 + .../service/signin/types/types.go | 47 + .../service/signin/validators.go | 39 + .../aws-sdk-go-v2/service/sso/CHANGELOG.md | 4 + .../service/sso/go_module_metadata.go | 2 +- .../service/ssooidc/CHANGELOG.md | 17 + .../service/ssooidc/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/service/sts/CHANGELOG.md | 4 + .../aws-sdk-go-v2/service/sts/api_client.go | 6 + .../service/sts/go_module_metadata.go | 2 +- .../go-openapi/runtime/.golangci.yml | 2 +- .../go-openapi/runtime/CONTRIBUTORS.md | 4 +- .../go-openapi/runtime/middleware/request.go | 2 +- .../github.com/go-openapi/spec/.golangci.yml | 3 + .../go-openapi/spec/CONTRIBUTORS.md | 4 +- vendor/github.com/go-openapi/spec/README.md | 16 +- vendor/github.com/go-openapi/spec/header.go | 6 +- .../go-openapi/spec/schema_loader.go | 2 +- .../go-openapi/swag/CONTRIBUTORS.md | 4 +- vendor/github.com/go-openapi/swag/README.md | 16 +- .../go-openapi/validate/CONTRIBUTORS.md | 4 +- .../github.com/go-openapi/validate/README.md | 16 +- vendor/github.com/go-openapi/validate/spec.go | 9 +- .../go-openapi/validate/spec_messages.go | 20 + .../go-openapi/validate/spec_ref_warnings.go | 209 ++ .../sdk/go/dockerbuild/image.go | 31 + .../dockerbuild/internal/pulumiUtilities.go | 4 +- .../sdk/go/dockerbuild/pulumi-plugin.json | 2 +- .../sdk/v9/go/gitlab/applicationSettings.go | 2 +- .../pulumi-gitlab/sdk/v9/go/gitlab/branch.go | 2 +- .../sdk/v9/go/gitlab/clusterAgentToken.go | 4 +- .../getGroupServiceAccountAccessTokens.go | 2 + .../v9/go/gitlab/getSecurityPolicyDocument.go | 2 +- .../sdk/v9/go/gitlab/integrationHarbor.go | 2 +- .../v9/go/gitlab/internal/pulumiUtilities.go | 4 +- .../sdk/v9/go/gitlab/pulumi-plugin.json | 2 +- .../sdk/v9/go/gitlab/userGpgKey.go | 2 +- .../sdk/v9/go/gitlab/userSshKey.go | 2 +- .../github.com/pulumi/pulumi/sdk/v3/.version | 2 +- .../pulumi/sdk/v3/go/common/apitype/core.go | 54 + .../sdk/v3/go/common/apitype/deployments.json | 90 + .../v3/go/common/resource/custom_timeouts.go | 3 +- .../common/resource/plugin/analyzer_plugin.go | 1 + .../common/resource/plugin/analyzer_server.go | 1 + .../v3/go/common/resource/plugin/provider.go | 3 + .../common/resource/plugin/provider_plugin.go | 2 + .../common/resource/plugin/provider_server.go | 1 + .../v3/go/common/resource/resource_snippet.go | 57 + .../sdk/v3/go/common/workspace/creds.go | 50 +- .../pulumi/pulumi/sdk/v3/go/pulumi/context.go | 9 +- .../pulumi/sdk/v3/go/pulumi/provider.go | 1 + .../pulumi/sdk/v3/go/pulumi/resource.go | 1 + .../pulumi/sdk/v3/proto/go/analyzer.pb.go | 15 +- .../pulumi/sdk/v3/proto/go/provider.pb.go | 36 +- .../pulumi/sdk/v3/proto/go/resource.pb.go | 15 +- vendor/github.com/sahilm/fuzzy/fuzzy.go | 34 +- vendor/golang.org/x/sync/errgroup/errgroup.go | 2 +- vendor/modules.txt | 68 +- 170 files changed, 6952 insertions(+), 961 deletions(-) delete mode 100644 tools/vendor/golang.org/x/tools/internal/goplsexport/export.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteConsoleAuthorizationConfiguration.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteResourcePermissionStatement.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetConsoleAuthorizationConfiguration.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetResourcePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListResourcePermissionStatements.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutConsoleAuthorizationConfiguration.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutResourcePermissionStatement.go create mode 100644 vendor/github.com/go-openapi/validate/spec_ref_warnings.go create mode 100644 vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/resource_snippet.go diff --git a/go.mod b/go.mod index f465f2858..2fd8ea3de 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.26.0 replace ( github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.0 github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.7 - github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.3 + github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.4 ) require ( @@ -13,7 +13,7 @@ require ( github.com/mapt-oss/pulumi-ibmcloud/sdk v0.0.12 github.com/pulumi/pulumi-command/sdk v1.2.1 github.com/pulumi/pulumi-random/sdk/v4 v4.21.0 - github.com/pulumi/pulumi/sdk/v3 v3.245.0 + github.com/pulumi/pulumi/sdk/v3 v3.246.0 github.com/sirupsen/logrus v1.9.4 github.com/spf13/cobra v1.10.2 ) @@ -27,11 +27,11 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.7.0 github.com/IBM/go-sdk-core/v5 v5.21.4 github.com/aws/amazon-ec2-instance-selector/v3 v3.1.3 - github.com/aws/aws-sdk-go-v2 v1.41.12 - github.com/aws/aws-sdk-go-v2/config v1.32.20 + github.com/aws/aws-sdk-go-v2 v1.42.0 + github.com/aws/aws-sdk-go-v2/config v1.32.25 github.com/aws/aws-sdk-go-v2/service/ec2 v1.305.2 github.com/aws/aws-sdk-go-v2/service/s3 v1.103.2 - github.com/aws/aws-sdk-go-v2/service/sts v1.43.2 + github.com/aws/aws-sdk-go-v2/service/sts v1.43.3 github.com/pulumi/pulumi-aws-native/sdk v1.68.0 github.com/pulumi/pulumi-aws/sdk/v7 v7.32.0 github.com/pulumi/pulumi-awsx/sdk/v3 v3.6.0 @@ -42,11 +42,11 @@ require ( github.com/pulumi/pulumi-azure-native-sdk/network/v3 v3.19.0 github.com/pulumi/pulumi-azure-native-sdk/resources/v3 v3.19.0 github.com/pulumi/pulumi-azure-native-sdk/storage/v3 v3.19.0 - github.com/pulumi/pulumi-gitlab/sdk/v9 v9.11.0 + github.com/pulumi/pulumi-gitlab/sdk/v9 v9.11.1 github.com/pulumi/pulumi-tls/sdk/v5 v5.5.0 golang.org/x/exp v0.0.0-20260603202125-055de637280b - k8s.io/apimachinery v0.36.1 - k8s.io/client-go v0.36.1 + k8s.io/apimachinery v0.36.2 + k8s.io/client-go v0.36.2 ) require ( @@ -63,17 +63,17 @@ require ( require ( github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.29 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.21 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.28 // indirect - github.com/aws/aws-sdk-go-v2/service/pricing v1.42.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29 // indirect + github.com/aws/aws-sdk-go-v2/service/pricing v1.42.7 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/evertras/bubble-table v0.19.2 // indirect github.com/hashicorp/hcl/v2 v2.24.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/oliveagle/jsonpath v0.1.4 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect - github.com/sahilm/fuzzy v0.1.2 // indirect + github.com/sahilm/fuzzy v0.1.3 // indirect golang.org/x/mod v0.36.0 golang.org/x/tools v0.45.0 // indirect ) @@ -85,19 +85,19 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.2.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.7.2 // indirect github.com/BurntSushi/toml v1.6.0 // indirect - github.com/IBM/platform-services-go-sdk v0.99.0 // indirect + github.com/IBM/platform-services-go-sdk v0.99.2 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/atotto/clipboard v0.1.4 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.19.19 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.25 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.28 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.28 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.19.24 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.28 // indirect - github.com/aws/aws-sdk-go-v2/service/signin v1.1.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.31.2 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29 // indirect + github.com/aws/aws-sdk-go-v2/service/signin v1.2.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.31.3 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6 // indirect github.com/aws/smithy-go v1.27.2 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/cenkalti/backoff/v5 v5.0.3 // indirect @@ -112,7 +112,7 @@ require ( github.com/charmbracelet/x/term v0.2.2 // indirect github.com/clipperhouse/displaywidth v0.11.0 // indirect github.com/clipperhouse/uax29/v2 v2.7.0 // indirect - github.com/cloudflare/circl v1.6.3 // indirect + github.com/cloudflare/circl v1.6.4 // indirect github.com/cyphar/filepath-securejoin v0.6.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect @@ -125,14 +125,14 @@ require ( github.com/go-openapi/jsonpointer v0.23.1 // indirect github.com/go-openapi/jsonreference v0.21.6 // indirect github.com/go-openapi/loads v0.24.0 // indirect - github.com/go-openapi/runtime v0.32.2 // indirect - github.com/go-openapi/runtime/server-middleware v0.32.2 // indirect - github.com/go-openapi/spec v0.22.5 // indirect + github.com/go-openapi/runtime v0.32.4 // indirect + github.com/go-openapi/runtime/server-middleware v0.32.4 // indirect + github.com/go-openapi/spec v0.22.6 // indirect github.com/go-openapi/strfmt v0.26.3 // indirect - github.com/go-openapi/swag v0.26.0 // indirect - github.com/go-openapi/swag/cmdutils v0.26.0 // indirect + github.com/go-openapi/swag v0.26.1 // indirect + github.com/go-openapi/swag/cmdutils v0.26.1 // indirect github.com/go-openapi/swag/conv v0.26.1 // indirect - github.com/go-openapi/swag/fileutils v0.26.0 // indirect + github.com/go-openapi/swag/fileutils v0.26.1 // indirect github.com/go-openapi/swag/jsonname v0.26.1 // indirect github.com/go-openapi/swag/jsonutils v0.26.1 // indirect github.com/go-openapi/swag/loading v0.26.1 // indirect @@ -141,7 +141,7 @@ require ( github.com/go-openapi/swag/stringutils v0.26.1 // indirect github.com/go-openapi/swag/typeutils v0.26.1 // indirect github.com/go-openapi/swag/yamlutils v0.26.1 // indirect - github.com/go-openapi/validate v0.25.3 // indirect + github.com/go-openapi/validate v0.26.0 // indirect github.com/go-viper/mapstructure/v2 v2.5.0 // indirect github.com/golang-jwt/jwt/v5 v5.3.1 // indirect github.com/golang/glog v1.2.5 // indirect @@ -173,7 +173,7 @@ require ( github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.25.0 // indirect - github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.18 // indirect + github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.19 // indirect github.com/pulumi/pulumi-docker/sdk/v4 v4.5.8 // indirect github.com/sagikazarmark/locafero v0.12.0 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect @@ -198,7 +198,7 @@ require ( go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/oauth2 v0.36.0 // indirect - golang.org/x/sync v0.20.0 // indirect + golang.org/x/sync v0.21.0 // indirect golang.org/x/time v0.15.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect @@ -220,7 +220,7 @@ require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/ProtonMail/go-crypto v1.4.1 // indirect github.com/aws/aws-sdk-go-v2/service/ecs v1.82.3 - github.com/aws/aws-sdk-go-v2/service/iam v1.54.3 + github.com/aws/aws-sdk-go-v2/service/iam v1.54.5 github.com/blang/semver v3.5.1+incompatible // indirect github.com/cheggaaa/pb v1.0.29 // indirect github.com/djherbis/times v1.6.0 // indirect diff --git a/go.sum b/go.sum index 32129c888..d0033d313 100644 --- a/go.sum +++ b/go.sum @@ -42,8 +42,8 @@ github.com/IBM-Cloud/power-go-client v1.15.0 h1:bXkcx9DlhCmNr9w2xHI9lpzjkfM7uLVv github.com/IBM-Cloud/power-go-client v1.15.0/go.mod h1:UTyMxybFDj0xHNalAIC5qfRZs16gOSDzPFfUOWnRD64= github.com/IBM/go-sdk-core/v5 v5.21.4 h1:f1x/AkOj1BZuOHUM7qyeIt6Cw2pprlDRIKR+RUpxobs= github.com/IBM/go-sdk-core/v5 v5.21.4/go.mod h1:cZJMMEImJkIXCd61kHeDFtjbdDpXq4ua4ITrwpBYdWs= -github.com/IBM/platform-services-go-sdk v0.99.0 h1:oaWxQ6hSzqzFF3E9WU2FpQi77FMPPHRW+pMzOO7r0PQ= -github.com/IBM/platform-services-go-sdk v0.99.0/go.mod h1:t93mozFmKrxexnKNdx2gNOtEI9Wd62dKAVffQYm0vRM= +github.com/IBM/platform-services-go-sdk v0.99.2 h1:vMqFWU8WS/aYiZrA8y+kldJCAhJjM6QfJgxROKumdZY= +github.com/IBM/platform-services-go-sdk v0.99.2/go.mod h1:t93mozFmKrxexnKNdx2gNOtEI9Wd62dKAVffQYm0vRM= github.com/IBM/vpc-go-sdk v0.84.0 h1:r2wIAOrRGD7bIPaZ3M/0HLUSNziUW9kdDyW96Wf3eUg= github.com/IBM/vpc-go-sdk v0.84.0/go.mod h1:PkBoJoyDAdkcM2wrBSTJr0L6BVoX00wmX5LK5bR1/PY= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= @@ -65,48 +65,48 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/amazon-ec2-instance-selector/v3 v3.1.3 h1:13qtG4reL2+2UiCm2U7gM9QJthDO8hPPzvn7hTjHask= github.com/aws/amazon-ec2-instance-selector/v3 v3.1.3/go.mod h1:wdlMRtz9G4IO6H1yZPsqfGBxR8E6B/bdxHlGkls4kGQ= -github.com/aws/aws-sdk-go-v2 v1.41.12 h1:DIKX2c31ekm9RA2D9FBj1EWXx++9AdAqRw+e78Tq2Ck= -github.com/aws/aws-sdk-go-v2 v1.41.12/go.mod h1:27+ACypSLljLAEKsCYOmrjKh83vuTRkuAe9Uv/3A4bg= +github.com/aws/aws-sdk-go-v2 v1.42.0 h1:XvXMJTkFQtpBKIWZnmr9ZEOc2InWM2yldjXEJ/bymhA= +github.com/aws/aws-sdk-go-v2 v1.42.0/go.mod h1:27+ACypSLljLAEKsCYOmrjKh83vuTRkuAe9Uv/3A4bg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13 h1:p1BBrg/Hhp6uK7zpejeI8QFXHJeC/mynzi04Sl03k9g= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13/go.mod h1:8cIfkE9MDhkRZGpQ22aV6/lkYeYSozpz16Smrs5x4Ls= -github.com/aws/aws-sdk-go-v2/config v1.32.20 h1:8VMDnWc/kEzxsI/1ngGM9mG81a8IGmIHD8KLcYGwagc= -github.com/aws/aws-sdk-go-v2/config v1.32.20/go.mod h1:PuwEpciweIXGULWeOeSTXtSbH4CW9mWdWrhdCKQI1sM= -github.com/aws/aws-sdk-go-v2/credentials v1.19.19 h1:yuFzSV1U0aRNYCQGVaTY2zW2M/L93pYHnXnrJUphYhU= -github.com/aws/aws-sdk-go-v2/credentials v1.19.19/go.mod h1:7y63L1kGzeoDlJaQ3Z578KrnmfBut96JjvJUzGwR+YE= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.25 h1:0w6dCiO8iez+YKwRhRBlL1CH/E3GTfdkuzrwj1by8vo= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.25/go.mod h1:9FDWUothyr5RCRAHc45XOiVCzUR8n/IhCYX+uVqw6vk= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.28 h1:Xf2j7NdVcUKomlZ4iihOP4AZ3Fzlr8h4yKpXeP+OFPg= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.28/go.mod h1:O8cDo1dW63jU7ki//kRe1z+tLGcpnD1jrouitsQddDw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.28 h1:KqIfN9kpkKkcBqBbNpNGTIrXO6ExTUvFKvXkC+YAzVo= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.28/go.mod h1:uxtQiKvLtNS4iXVsH2McVD/ls8FKN/uUhe1hGxPjrw0= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.29 h1:VkE9FuzTQVjBBrnj4+oCdxCLFIz7aqLYKUCjtvxVcOs= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.29/go.mod h1:H32Z2Qth9b+9LqjyBsCnozMQ8H2N7YBUDVXwbs0iggg= +github.com/aws/aws-sdk-go-v2/config v1.32.25 h1:ACCejvStYoilgwrfegSt5ZntCbPrk52qfwyNcnl3omM= +github.com/aws/aws-sdk-go-v2/config v1.32.25/go.mod h1:LJyU8sDRbXUxFn8xMJIGP+v9QYYwveNLI8a/giAOiAs= +github.com/aws/aws-sdk-go-v2/credentials v1.19.24 h1:2hQqYCV9yqyePQ9o6dCrZc/zO8U3TwPr9mIKlZnPu/I= +github.com/aws/aws-sdk-go-v2/credentials v1.19.24/go.mod h1:IDwpACtwqHLISdzfwUUNq4P9DsB/h5BLg4FwJPNfqFY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29 h1:r6qZHbT+wxgWO/e9vYNUEtg7lv5+UN3pRqKhLXvnArg= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29/go.mod h1:QRnaRcTVGKPGRy8w78HMQtKUGRYcnMZAANATkeVA6Mo= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29 h1:f3vKqSo13fhTYb+JEcXwXefZQE26I1FB5eTSniU67ko= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29/go.mod h1:MzoLFUArKGpGD+ukmPiTPG1X5x4o6M2kq4v2dr1FiEc= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29 h1:RdwIf/CuUsvJX3RgJagbOyotl/cxoLY4xviKuE7p2GY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29/go.mod h1:71wt8W2EgswdZy9Mf9KNnzxZ3TiZlv4caKghPktDOkA= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30 h1:VTGy885W5DKBxWRUJbym9hytNaYzsyaPkCHGRRMAOhU= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30/go.mod h1:AS0HycUvJRFvTt613AYDOgO2jzw+00cVSMny8XB3yMY= github.com/aws/aws-sdk-go-v2/service/ec2 v1.305.2 h1:xcHUdx4FNgUZmLuI6vqB5QDsVnWx1MVbPSoaXtLxUB8= github.com/aws/aws-sdk-go-v2/service/ec2 v1.305.2/go.mod h1:SUtka5kgdr5Wx2BdRrH/IGkCKHW63IVQoyBkP0P1gdo= github.com/aws/aws-sdk-go-v2/service/ecs v1.82.3 h1:0h+khLoWaCU9JE6ZeQrQ9xZS+EnrjISQlnt/xtxEL/I= github.com/aws/aws-sdk-go-v2/service/ecs v1.82.3/go.mod h1:st/PIQyL6fJSoYTxijbYIKZjPpPP2JiUdcUf++xX0Kk= -github.com/aws/aws-sdk-go-v2/service/iam v1.54.3 h1:ur8hMC1VjTXvvTfE9LEbtmuvfgjOW7mhPHE65Hmk5zc= -github.com/aws/aws-sdk-go-v2/service/iam v1.54.3/go.mod h1:BislBOlmxEfyqv4S86lyEf9yl3FlxlgX8sBHBBqQPOo= +github.com/aws/aws-sdk-go-v2/service/iam v1.54.5 h1:a/gAOhIOi+vHYeRU224WIXlJrLXs4Z1Qbm92vfX64jc= +github.com/aws/aws-sdk-go-v2/service/iam v1.54.5/go.mod h1:tMNzI+fYFCk4cIdZ7FEybLzShwnmWkfxQw85ED1b4ng= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 h1:ZD2+BSw9vFsNlKYIasSNt3uDbjqqXIBcM13UJv/Lx2k= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12/go.mod h1:Ms4zlcVBbXbiP7EVLhl+lgjvA/a7YphqQ3Ih3174EmI= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.21 h1:FsZxbPiVgEHYofziwfylouMki8b1Z7mI4CMU/7bhwBA= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.21/go.mod h1:Mmm30OV+JLXYQUcbSd84THnv3P5JtjhVDujLwMqRG0U= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.28 h1:axj4mEDletwKmTm/9jR+DkIMmCfcn5vE4jBMAAN+3Vg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.28/go.mod h1:3Aaz69M0jqfSHLKqxgolgUBFT4hpwSNc7DzC95orEi8= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.28 h1:li8rTZAAb22g4UsxbjwMdaNVWbgVcDzPqI7nDTI+mF4= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.28/go.mod h1:/brXioSGIMEdcBFoubpSdmighSVp6poP+mma/wB7iHA= -github.com/aws/aws-sdk-go-v2/service/pricing v1.42.2 h1:qLe0KpIqzUuBQk6iV7oiOGW/EEWLs87uTP/xNKpfe88= -github.com/aws/aws-sdk-go-v2/service/pricing v1.42.2/go.mod h1:aciuNKM3vUImiRzhEquRAAfetzdIKAdbEIL3cTm1XE4= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22 h1:V51LGlOq/1VsDsHUdoklAQi7rMmx4qQubvFYAlP2254= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22/go.mod h1:4Pzhyz8hJOm2bepgl+NjvRx8vlUFAIIvJnZ/MkcNPpU= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29 h1:DRebniUGZ2MqiiIVmQJ04vIXr918hubdHMnarSLEWyU= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29/go.mod h1:LfRkPCD8YHDM2E5eTkos2UpwYeZnBcVarTa8L59bJHA= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29 h1:hiME6pBzC7OTl9LMtlyTWBuEl1f4QBcUmFDKC7MLXtc= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29/go.mod h1:G7RP+uhagpKtKhd1BM9N6JQqjCcGEU47K5lBVZQyRQw= +github.com/aws/aws-sdk-go-v2/service/pricing v1.42.7 h1:1kgjCE5D1kxDD1ouqYda7590UEjJ6AQiEbzTVxtHk/k= +github.com/aws/aws-sdk-go-v2/service/pricing v1.42.7/go.mod h1:R/LmxYGRy1KePN3vIeIK5rsHcmSLPCTcI7Kjhardqog= github.com/aws/aws-sdk-go-v2/service/s3 v1.103.2 h1:b4ikkRk22T4xYkEgaWc3Voe+3xbt5YbbFhNehOWyUiY= github.com/aws/aws-sdk-go-v2/service/s3 v1.103.2/go.mod h1:Gp7eHZ0NZ8ZK5RXpoIUp/C8OeAmJqpCgdwEK1D/QOek= -github.com/aws/aws-sdk-go-v2/service/signin v1.1.1 h1:1VwbP3qMNfxUDEXWki4rCE5iA+44VA1lokTz9HasGzw= -github.com/aws/aws-sdk-go-v2/service/signin v1.1.1/go.mod h1:vUtyoSj0OPji3kjIVSc/GlKuWEiL33f/WFxl6dmpy/A= -github.com/aws/aws-sdk-go-v2/service/sso v1.31.2 h1:ySNWu7TPmj5fKFIa1GYvX+Ddxd5ccruqC20aMNuyWDM= -github.com/aws/aws-sdk-go-v2/service/sso v1.31.2/go.mod h1:A+U9luAOwFeB1kseyWCITVg7/NntoPebCFR9pQ4ch9A= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.2 h1:hc+lBYiiTr8Zk4MTzIsQ92MeDWCIDvWGmzKUWOaBcOg= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.2/go.mod h1:hU6fqB3OJA6/ePheD47LQnxvjYk6br6PtQxs+Q9ojvk= -github.com/aws/aws-sdk-go-v2/service/sts v1.43.2 h1:RTO7mmGyedgnNmcPh3yQizNfc6GKoV5iqfdJavuf9vw= -github.com/aws/aws-sdk-go-v2/service/sts v1.43.2/go.mod h1:fBhUZXDin9YYqhcpOMjIcpdik25rVwWyxLdPH1RZd9s= +github.com/aws/aws-sdk-go-v2/service/signin v1.2.0 h1:3nXpRcFwRCW8n7HgO2QGy0Dc20eQNfBuUemGQhpF8m8= +github.com/aws/aws-sdk-go-v2/service/signin v1.2.0/go.mod h1:LxYujSTLPRlp2vTtcUO/+1ilrew8ytt6SvQyOgejzFQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.31.3 h1:ey1XLTYXb9PcLt4535632o5kCGXNXEhNb620Dqwuylo= +github.com/aws/aws-sdk-go-v2/service/sso v1.31.3/go.mod h1:Lk7PlmoTYryQmyBG0EXqj5BcUbj3whXdU2s3yGI3EAc= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6 h1:yLr03zQE/5Eu5l3QU0Si+xMbLMbSDF2YXsigqXngs6g= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6/go.mod h1:Q5N6icH+KJZDLh+ESNwzdv6cZ6vLFF/egy3IOxWhmz4= +github.com/aws/aws-sdk-go-v2/service/sts v1.43.3 h1:VrIhKRCSK1umelSgB9RghvA9RTUYeQffyAS5ApXehNI= +github.com/aws/aws-sdk-go-v2/service/sts v1.43.3/go.mod h1:r8wkDOuLaaMFqFiYAb8dGY2A3gJCOujMc6CFOVC4Zhc= github.com/aws/smithy-go v1.27.2 h1:y9NPmSE6am6LjEFPfqHqG/jJk7AauQvhCJONKh7kpzk= github.com/aws/smithy-go v1.27.2/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= @@ -145,8 +145,8 @@ github.com/clipperhouse/displaywidth v0.11.0 h1:lBc6kY44VFw+TDx4I8opi/EtL9m20WSE github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3JhNl3dSqnGhOoSD/o0= github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk= github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM= -github.com/cloudflare/circl v1.6.3 h1:9GPOhQGF9MCYUeXyMYlqTR6a5gTrgR/fBLXvUgtVcg8= -github.com/cloudflare/circl v1.6.3/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4= +github.com/cloudflare/circl v1.6.4 h1:pOXuDTCEYyzydgUpQ0CQz3LsinKjiSk6nNP5Lt5K64U= +github.com/cloudflare/circl v1.6.4/go.mod h1:YxarevkLlbaHuWsxG6vmYNWBEsSp4pnp7j+4VljMavY= github.com/coocood/freecache v1.2.7 h1:IDP0x1Yg8sgRmsSWzFyhaB+amYJpKS7v5QIXNHxXvM8= github.com/coocood/freecache v1.2.7/go.mod h1:+Ga2+A5/0D6MMistGuoeKZaZucAGZ56u+fYKiY+xqNA= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= @@ -213,22 +213,22 @@ github.com/go-openapi/jsonreference v0.21.6 h1:NZ5nGfnaM1n4I43Xjm1e5/M2GjOwQwndQ github.com/go-openapi/jsonreference v0.21.6/go.mod h1:xzbgtQ3ZbWxvET3AxdzCJlJt6vkovbf+IfSPJjD0tUY= github.com/go-openapi/loads v0.24.0 h1:4LLorXRPTzIN9V6ngMUZbAscsBOUBk3Oa8cClu/bFrQ= github.com/go-openapi/loads v0.24.0/go.mod h1:xQMgX+hw5xRAhGrcDXxeMw78IFqUpIzhleu3HqPhyF4= -github.com/go-openapi/runtime v0.32.2 h1:X9mZz716lFwYZ6bFV1BBnthNdHTy46zKM5Em4D1UISI= -github.com/go-openapi/runtime v0.32.2/go.mod h1:IfM3cpgencPuwBp5Uo16i2IQaE74odL7Q4DCGovIQac= -github.com/go-openapi/runtime/server-middleware v0.32.2 h1:fuWQmduxHbEjBuRkQ3c7pI5YKSuPCJ2RHeZafceo2yw= -github.com/go-openapi/runtime/server-middleware v0.32.2/go.mod h1:fYPep4GdTwg/XqZUjR40uIM/8C12Ba5M+MrGCiwpTHo= -github.com/go-openapi/spec v0.22.5 h1:KhO7RBlKQfonUWX2WzQCoLIXVA6AcNqDGZ3a1Dutdlo= -github.com/go-openapi/spec v0.22.5/go.mod h1:vxpOtMya5TXtENXKE5bKqv5NjocVhyhxHrlZfvKnZ74= +github.com/go-openapi/runtime v0.32.4 h1:8ElGj/3goG0itt0nBPP6Cm57ehcYyuHoI3O20nxgvkw= +github.com/go-openapi/runtime v0.32.4/go.mod h1:Bz6keOZw1NX4T6f+m42OoT1MBPDt6Re13dbccHyGH/4= +github.com/go-openapi/runtime/server-middleware v0.32.4 h1:AU6eLMq9CXwh8f6kC1pivtkz+7lfo3TmakMBbUisKME= +github.com/go-openapi/runtime/server-middleware v0.32.4/go.mod h1:fYPep4GdTwg/XqZUjR40uIM/8C12Ba5M+MrGCiwpTHo= +github.com/go-openapi/spec v0.22.6 h1:Tyy1pLaNCM8GBCFLoGYLonjJi6zykqyLCjXLc19ZPic= +github.com/go-openapi/spec v0.22.6/go.mod h1:HZvTHat+iH0PALQRWhrqIHtU/PEqxqd89fu0MxGlMeM= github.com/go-openapi/strfmt v0.26.3 h1:rzmslHarJgBbf2qfGge+X3htclQfmXqBZMm0Too0HhU= github.com/go-openapi/strfmt v0.26.3/go.mod h1:a5nsUw0oRpQzZeOwx8bi6cKbzFZslpbCKt1LEot+KnQ= -github.com/go-openapi/swag v0.26.0 h1:GVDXCmfvhfu1BxiHo8/FA+BbKmhecHnG3varjON5/RI= -github.com/go-openapi/swag v0.26.0/go.mod h1:82g3193sZJRbocs7bNCqGfIgq8pkuwVwCfhKIRlEQF0= -github.com/go-openapi/swag/cmdutils v0.26.0 h1:iowihOcvq7y4egO8cOq0dmfohz6wfeQ63U1EnuhO2TU= -github.com/go-openapi/swag/cmdutils v0.26.0/go.mod h1:Sm1MVFMkF6guJJ+pQqHnQA3N0j9qALV3NxzDSv6bETM= +github.com/go-openapi/swag v0.26.1 h1:l5sVEyVpwj+DDYeZyo7wQI/Ebn/mKYIyGB/pFwAfGoQ= +github.com/go-openapi/swag v0.26.1/go.mod h1:yNY38BbIVthxbkDtq1UHBCGasBqjakW3lCR6ANzdBEw= +github.com/go-openapi/swag/cmdutils v0.26.1 h1:f2iE1ijYaJ3nuu5PaEMx3zpEhzhZFgivCJObWEObLIQ= +github.com/go-openapi/swag/cmdutils v0.26.1/go.mod h1:Sm1MVFMkF6guJJ+pQqHnQA3N0j9qALV3NxzDSv6bETM= github.com/go-openapi/swag/conv v0.26.1 h1:slr5FVkg9Wc3Y5zcwenD8Sd/PQ94b2I/QJI7N7KTBpg= github.com/go-openapi/swag/conv v0.26.1/go.mod h1:mvQXgPptZk9GTrFgGwWvT4q+dN+zQej9JfmGwnipz1A= -github.com/go-openapi/swag/fileutils v0.26.0 h1:WJoPRvsA7QRiiWluowkLJa9jaYR7FCuxmDvnCgaRRxU= -github.com/go-openapi/swag/fileutils v0.26.0/go.mod h1:0WDJ7lp67eNjPMO50wAWYlKvhOb6CQ37rzR7wrgI8Tc= +github.com/go-openapi/swag/fileutils v0.26.1 h1:K1XCM2CGhfNsc6YDt6v7Q5+1e59rftYWdcu/isZhvFw= +github.com/go-openapi/swag/fileutils v0.26.1/go.mod h1:mYUgxQAKX4ShS3qvvySx+/9yrlUnDhjiD1CalaQl8lQ= github.com/go-openapi/swag/jsonname v0.26.1 h1:VReupaV6WxlAsCn0e4DUfgV6bPmINnPpyJDLqSfNPcE= github.com/go-openapi/swag/jsonname v0.26.1/go.mod h1:OvdW6BoWoj33pTfi7x9vFrgmT+fk7aw0BRwvCE0YOuc= github.com/go-openapi/swag/jsonutils v0.26.1 h1:2hdBfFkHg+7Wrz2VsCbeyR6hzkRDs7AztnMR2u84yOY= @@ -251,8 +251,8 @@ github.com/go-openapi/testify/enable/yaml/v2 v2.5.1 h1:q9NtHwK4qHF7yZziBPvZyv7zW github.com/go-openapi/testify/enable/yaml/v2 v2.5.1/go.mod h1:JW0MXIotCYps/XsgJnG3a8Q7rE5xAiBwoOD5OfaIQBk= github.com/go-openapi/testify/v2 v2.5.1 h1:TMdhCaw8fUNraVSf3Omoob1dO/AzBfhtFAPW0an6sBo= github.com/go-openapi/testify/v2 v2.5.1/go.mod h1:SgsVHtfooshd0tublTtJ50FPKhujf47YRqauXXOUxfw= -github.com/go-openapi/validate v0.25.3 h1:4nzAIavcJ7WveHK2+V1UAkZK3kWcjzxZCzjfZAfavKs= -github.com/go-openapi/validate v0.25.3/go.mod h1:GemfuGMyYpIaBoKpX3z8sLywrmxpzWVOoJ7R0VeAVuk= +github.com/go-openapi/validate v0.26.0 h1:dxWzQ3F+vb1SajqUxHjwb5T4mTpSHmdrtv5Bi7+ZNhw= +github.com/go-openapi/validate v0.26.0/go.mod h1:b4o00uq7fJeJA+wWhVFCJpKTctzeFwzZImGGmHsl2JA= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= @@ -432,20 +432,20 @@ github.com/pulumi/pulumi-azure-native-sdk/v3 v3.19.0 h1:Mfl+Z1zZuLXuEn//PRi8mnnA github.com/pulumi/pulumi-azure-native-sdk/v3 v3.19.0/go.mod h1:qniEet/A/m6/0IFkzN0IWI0VMl5fkI5r27RPAqA2dtM= github.com/pulumi/pulumi-command/sdk v1.2.1 h1:mAziZ91a/9U+5IjZH5Skcar80OSmpBSYljeQNRblTWQ= github.com/pulumi/pulumi-command/sdk v1.2.1/go.mod h1:hQxv9DXg6bFjcd9BEiNdMImQ/V1rnC9D115q5VXYNps= -github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.18 h1:emkSEfjXfz7i2vNDi43WTqABhP9TY2mQnO2zdL683hw= -github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.18/go.mod h1:BriBqoV2I/58/AZy4/4oJfoiJYX7Nf/NxsAmGXDgvgo= +github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.19 h1:rYAxB0nOsif4U5MCZWcXJ0FvnbL4YtbdhWLiRiEwdPE= +github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.19/go.mod h1:iRiNhXmySLlREgx1zeoD4Es62WU2jTpd5YXdZ/0AQB4= github.com/pulumi/pulumi-docker/sdk/v4 v4.5.8 h1:rik9L2SIpsoDenY51MkogR6GWgu/0Sy/XmyQmKWNUqU= github.com/pulumi/pulumi-docker/sdk/v4 v4.5.8/go.mod h1:eph7BPNPkEIIK882/Ll4dbeHl5wZEc/UvTcUW0CK1UY= -github.com/pulumi/pulumi-gitlab/sdk/v9 v9.11.0 h1:XAcIDBAILoK5ZsiBagl+CnWEhquFPcZoJRwzXk4CyJ8= -github.com/pulumi/pulumi-gitlab/sdk/v9 v9.11.0/go.mod h1:CyyVZdQV+98BE3LSo5Gz8nzteNVnHaOsBZeMpzVZwZQ= +github.com/pulumi/pulumi-gitlab/sdk/v9 v9.11.1 h1:DPDQD9FamQ3myy0EQOYuzUFvcJpQDr1H3GNwz/scDgA= +github.com/pulumi/pulumi-gitlab/sdk/v9 v9.11.1/go.mod h1:eS9gkxGvdzprE767heyMrPrMY/6FX9UbdPYeI4pbkE8= github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.31.1 h1:Hg9RK9zqIU9kFbD5KeiON06gPP7cLgS68jvsgMBmPgw= github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.31.1/go.mod h1:BAWI9R3JEEGOp1JlXLPSZKwBGANSrPGUWKtMnS5w5qw= github.com/pulumi/pulumi-random/sdk/v4 v4.21.0 h1:j6LtoXue77y16trYOR40iqCUxXxv8TnxvOCOP/a0zVI= github.com/pulumi/pulumi-random/sdk/v4 v4.21.0/go.mod h1:92+w+95clbBPdrYdi0uCajihmgol52w/pWgZJ9wT0To= github.com/pulumi/pulumi-tls/sdk/v5 v5.5.0 h1:oNZILwuCvNpiXMDkvagEEvdHUMEHo/UxqMKcn6aS7mg= github.com/pulumi/pulumi-tls/sdk/v5 v5.5.0/go.mod h1:cLzvf6CO+f/Wae6OcOaJQh9B5K6RtErETjX9TQ8XrDg= -github.com/pulumi/pulumi/sdk/v3 v3.245.0 h1:HvHDnraVlRm64xJJx38/hPNnTpfkOlfm7fHDSwyJJaE= -github.com/pulumi/pulumi/sdk/v3 v3.245.0/go.mod h1:BPWWuYPXcPH5YbXGoyy9Rrfa+evrh6IdM51AjDhcDpM= +github.com/pulumi/pulumi/sdk/v3 v3.246.0 h1:n7aigZmbyzVNz6mWpcA8f+0SMHRcBWZn/OlYWylRNvY= +github.com/pulumi/pulumi/sdk/v3 v3.246.0/go.mod h1:BPWWuYPXcPH5YbXGoyy9Rrfa+evrh6IdM51AjDhcDpM= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= @@ -455,8 +455,8 @@ github.com/rogpeppe/go-internal v1.15.0/go.mod h1:DrUVZyrJU+txYW5/1kwtXQSMFio52Z github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.12.0 h1:/NQhBAkUb4+fH1jivKHWusDYFjMOOKU88eegjfxfHb4= github.com/sagikazarmark/locafero v0.12.0/go.mod h1:sZh36u/YSZ918v0Io+U9ogLYQJ9tLLBmM4eneO6WwsI= -github.com/sahilm/fuzzy v0.1.2 h1:kdSkz23lx1meNjEl+SLJULeSbjTI4Dn14K/YxdGrIww= -github.com/sahilm/fuzzy v0.1.2/go.mod h1:au6//VbVSqu6DFrkL2CfjlJ5iURpNCPeE+1GwY3XsT8= +github.com/sahilm/fuzzy v0.1.3 h1:juByESSS32nVD81vr6tHmKmA/8zde7gE+x5CLxrzXPU= +github.com/sahilm/fuzzy v0.1.3/go.mod h1:au6//VbVSqu6DFrkL2CfjlJ5iURpNCPeE+1GwY3XsT8= github.com/samber/lo v1.51.0 h1:kysRYLbHy/MB7kQZf5DSN50JHmMsNEdeY24VzJFu7wI= github.com/samber/lo v1.51.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= @@ -573,8 +573,8 @@ golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= -golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM= +golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -642,12 +642,12 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.36.1 h1:XbL/EMj8K2aJpJtePmqUyQMsM0D4QI2pvl7YKJ20FTY= -k8s.io/api v0.36.1/go.mod h1:KOWo4ey3TINlXjeHVuwB3i+tXXnu+UcwFBHlI/9dvEo= -k8s.io/apimachinery v0.36.1 h1:G63Gjx2W+q0YD+72Vo8oY0nDnePVwnuzTmmy5ENrVSA= -k8s.io/apimachinery v0.36.1/go.mod h1:ibYOR00vW/I1kzvi5SF0dRuJ52BvKtfvRdOn35GPQ+8= -k8s.io/client-go v0.36.1 h1:FN/K8QIT2CEDt+2WB2HnWrUANZ50AP5GII43/SP2JR0= -k8s.io/client-go v0.36.1/go.mod h1:s6rAnCtTGYDQnpNjEhSaISV+2O8jwruZ6m3QOYBFbtU= +k8s.io/api v0.36.2 h1:TF6YDLIzKfccK7cq9YpTcGX8TJmEkHVRv78DM51fRYY= +k8s.io/api v0.36.2/go.mod h1:F4LbMO4brjZYh7yFkXWhynSvtB7YauxV4c+HHkNRGNg= +k8s.io/apimachinery v0.36.2 h1:0PE/W/WNy1UX61NLbXY5TMbJ6UwLL6E6lAPkYrKFxbQ= +k8s.io/apimachinery v0.36.2/go.mod h1:fvf/HOLXq9RId0rnDIbN1OEBvHXdQbLMM8nu0LcBUf4= +k8s.io/client-go v0.36.2 h1:bfgxmFKc9CgqsgX4xKLAAdmTQlWee7Ob/HlDOrJ5TBI= +k8s.io/client-go v0.36.2/go.mod h1:1vgO4OAlfPnoLcb+Rze2GF5rAr14w8qjrYMoyXJzQj0= k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc= k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0= k8s.io/kube-openapi v0.0.0-20260603220949-865597e52e25 h1:mPMaPMpBij2V1Wv/fR+HW124vVGXXvOSS9ver/9yjWs= diff --git a/oci/Containerfile b/oci/Containerfile index 4621e7465..505cef810 100644 --- a/oci/Containerfile +++ b/oci/Containerfile @@ -34,7 +34,7 @@ ARG PULUMI_RANDOM_VERSION=v4.21.0 # renovate: datasource=github-releases depName=pulumi/pulumi-aws-native ARG PULUMI_AWS_NATIVE_VERSION=v1.68.0 # renovate: datasource=github-releases depName=pulumi/pulumi-gitlab -ARG PULUMI_GITLAB_VERSION=v9.11.0 +ARG PULUMI_GITLAB_VERSION=v9.11.1 # renovate: datasource=github-releases depName=mapt-oss/pulumi-ibmcloud ARG PULUMI_IBMCLOUD_VERSION=v0.0.12 ENV IBMCLOUD_PLUGIN_URL https://github.com/mapt-oss/pulumi-ibmcloud/releases/download/${PULUMI_IBMCLOUD_VERSION}/pulumi-resource-ibmcloud-${PULUMI_IBMCLOUD_VERSION}-linux-${TARGETARCH}.tar.gz diff --git a/tools/go.mod b/tools/go.mod index c49476d1c..5a89d2343 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -5,7 +5,7 @@ go 1.26.0 replace ( github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.0 github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.7 - github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.3 + github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.4 ) require github.com/golangci/golangci-lint/v2 v2.12.2 @@ -21,7 +21,7 @@ require ( ) require ( - charm.land/lipgloss/v2 v2.0.3 // indirect + charm.land/lipgloss/v2 v2.0.4 // indirect github.com/ClickHouse/clickhouse-go-linter v1.2.1 // indirect github.com/bombsimon/wsl/v5 v5.8.0 // indirect github.com/charmbracelet/ultraviolet v0.0.0-20260601155805-6cf7526a1b3f // indirect @@ -29,7 +29,7 @@ require ( github.com/charmbracelet/x/windows v0.2.2 // indirect github.com/clipperhouse/displaywidth v0.11.0 // indirect github.com/denis-tingaikin/go-header v0.5.0 // indirect - github.com/dlclark/regexp2/v2 v2.2.1 // indirect + github.com/dlclark/regexp2/v2 v2.2.2 // indirect // github.com/golangci/gofmt v0.0.0-20251215234548-e7be49a5ab4d // indirect github.com/golangci/golines v0.15.0 // indirect github.com/golangci/rowserrcheck v0.0.0-20260602201336-0ec5bd2741d7 // indirect @@ -100,7 +100,7 @@ require ( github.com/ettle/strcase v0.2.0 // indirect github.com/fatih/color v1.19.0 // indirect github.com/fatih/structtag v1.2.0 // indirect - github.com/firefart/nonamedreturns v1.0.6 // indirect + github.com/firefart/nonamedreturns v1.0.7 // indirect github.com/fsnotify/fsnotify v1.10.1 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect github.com/ghostiam/protogetter v0.3.21 // indirect @@ -223,11 +223,11 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.28.0 // indirect golang.org/x/exp/typeparams v0.0.0-20260603202125-055de637280b // indirect - golang.org/x/mod v0.36.0 // indirect - golang.org/x/sync v0.20.0 // indirect - golang.org/x/sys v0.45.0 // indirect + golang.org/x/mod v0.37.0 // indirect + golang.org/x/sync v0.21.0 // indirect + golang.org/x/sys v0.46.0 // indirect golang.org/x/text v0.37.0 // indirect - golang.org/x/tools v0.45.0 // indirect + golang.org/x/tools v0.46.0 // indirect google.golang.org/protobuf v1.36.11 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect honnef.co/go/tools v0.7.0 // indirect diff --git a/tools/go.sum b/tools/go.sum index 88aa1e847..9f8d45233 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -2,8 +2,8 @@ 4d63.com/gocheckcompilerdirectives v1.4.0/go.mod h1:9ZOAiMOjqC/nRwci2fcUXVHUNLG/cH6r6rhUh+jTFtQ= 4d63.com/gochecknoglobals v0.2.2 h1:H1vdnwnMaZdQW/N+NrkT1SZMTBmcwHe9Vq8lJcYYTtU= 4d63.com/gochecknoglobals v0.2.2/go.mod h1:lLxwTQjL5eIesRbvnzIP3jZtG140FnTdz+AlMa+ogt0= -charm.land/lipgloss/v2 v2.0.3 h1:yM2zJ4Cf5Y51b7RHIwioil4ApI/aypFXXVHSwlM6RzU= -charm.land/lipgloss/v2 v2.0.3/go.mod h1:7myLU9iG/3xluAWzpY/fSxYYHCgoKTie7laxk6ATwXA= +charm.land/lipgloss/v2 v2.0.4 h1:lcPeVtcp23SNra7lHy8iYE4UC2aIipVQ47sbGyyxR5Q= +charm.land/lipgloss/v2 v2.0.4/go.mod h1:0653x8epbZSzdDfO/XPS1a/uYPOBeSsCssOpJOqDzik= codeberg.org/chavacava/garif v0.2.1 h1:K9oYxSlvlXrHXyW26Z4q61bTpJDo1wbvXcYKar/F/LM= codeberg.org/chavacava/garif v0.2.1/go.mod h1:oHnDSmc0f9K1MeE+MQD/yjkiIB5Xsn5y3S9Dg96Xk84= codeberg.org/polyfloyd/go-errorlint v1.9.0 h1:VkdEEmA1VBpH6ecQoMR4LdphVI3fA4RrCh2an7YmodI= @@ -120,16 +120,16 @@ github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42 github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8= github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/dlclark/regexp2/v2 v2.2.1 h1:mf4KkFUj0gJuarK8P+LgiS+Lit7m9N1yAwEfPbee7R0= -github.com/dlclark/regexp2/v2 v2.2.1/go.mod h1:avUrQvPaLz2DrFNHJF0taWAFFX2C1GMSSoeiqFjcBmU= +github.com/dlclark/regexp2/v2 v2.2.2 h1:MYWvNYw8okuqNhwTYO587EZMiDruVa2vhV6fsGpfya0= +github.com/dlclark/regexp2/v2 v2.2.2/go.mod h1:avUrQvPaLz2DrFNHJF0taWAFFX2C1GMSSoeiqFjcBmU= github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w= github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/firefart/nonamedreturns v1.0.6 h1:vmiBcKV/3EqKY3ZiPxCINmpS431OcE1S47AQUwhrg8E= -github.com/firefart/nonamedreturns v1.0.6/go.mod h1:R8NisJnSIpvPWheCq0mNRXJok6D8h7fagJTF8EMEwCo= +github.com/firefart/nonamedreturns v1.0.7 h1:gIrbIri68tN9rneOoWzBTA4B+rh5qP5Yq0yILeQwSfo= +github.com/firefart/nonamedreturns v1.0.7/go.mod h1:Kj/SHlG7im9GjmGfGBij361DJmPhOXZhydgHeJT1Xt4= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx59Ho= @@ -477,8 +477,8 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4= -golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ= +golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ= +golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -488,8 +488,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8= -golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww= +golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o= +golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -497,8 +497,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= -golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM= +golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -512,8 +512,8 @@ golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= -golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= +golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -534,8 +534,8 @@ golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0t golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.45.0 h1:18qN3FAooORvApf5XjCXgsuayZOEtXf6JK18I3+ONa8= -golang.org/x/tools v0.45.0/go.mod h1:LuUGqqaXcXMEFEruIVJVm5mgDD8vww/z/SR1gQ4uE/0= +golang.org/x/tools v0.46.0 h1:7jTurBkPZu4moS/Uy4OQT1M+QBlsj3wejyZwsT8Z7rk= +golang.org/x/tools v0.46.0/go.mod h1:FrD85F8l+NWL+9XWBSyVSHO6Ne4jutsfIFba7AWQ5Ys= golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= diff --git a/tools/vendor/charm.land/lipgloss/v2/.golangci.yml b/tools/vendor/charm.land/lipgloss/v2/.golangci.yml index c90f03161..f2e6be064 100644 --- a/tools/vendor/charm.land/lipgloss/v2/.golangci.yml +++ b/tools/vendor/charm.land/lipgloss/v2/.golangci.yml @@ -30,6 +30,9 @@ linters: - text: '(slog|log)\.\w+' linters: - noctx + - text: "naming" + linters: + - revive generated: lax presets: - common-false-positives diff --git a/tools/vendor/charm.land/lipgloss/v2/position.go b/tools/vendor/charm.land/lipgloss/v2/position.go index cea67763f..ce91442d6 100644 --- a/tools/vendor/charm.land/lipgloss/v2/position.go +++ b/tools/vendor/charm.land/lipgloss/v2/position.go @@ -39,7 +39,7 @@ func Place(width, height int, hPos, vPos Position, str string, opts ...Whitespac // PlaceHorizontal places a string or text block horizontally in an unstyled // block of a given width. If the given width is shorter than the max width of -// the string (measured by its longest line) this will be a noop. +// the string (measured by its longest line) this will be a noöp. func PlaceHorizontal(width int, pos Position, str string, opts ...WhitespaceOption) string { lines, contentWidth := getLines(str) gap := width - contentWidth @@ -86,7 +86,7 @@ func PlaceHorizontal(width int, pos Position, str string, opts ...WhitespaceOpti // PlaceVertical places a string or text block vertically in an unstyled block // of a given height. If the given height is shorter than the height of the -// string (measured by its newlines) then this will be a noop. +// string (measured by its newlines) then this will be a noöp. func PlaceVertical(height int, pos Position, str string, opts ...WhitespaceOption) string { contentHeight := strings.Count(str, "\n") + 1 gap := height - contentHeight diff --git a/tools/vendor/charm.land/lipgloss/v2/wrap.go b/tools/vendor/charm.land/lipgloss/v2/wrap.go index ca0a1e239..ccffe89b1 100644 --- a/tools/vendor/charm.land/lipgloss/v2/wrap.go +++ b/tools/vendor/charm.land/lipgloss/v2/wrap.go @@ -63,6 +63,12 @@ func (w *WrapWriter) Link() uv.Link { // Write writes to the buffer. func (w *WrapWriter) Write(p []byte) (int, error) { + if w.p == nil { + // The writer has been closed and its parser returned to the pool. + // Writing after close can happen during out-of-order teardown of + // nested writer chains; treat it as a no-op rather than panicking. + return len(p), nil + } for i := range p { b := p[i] w.p.Advance(b) diff --git a/tools/vendor/github.com/dlclark/regexp2/v2/syntax/charclass.go b/tools/vendor/github.com/dlclark/regexp2/v2/syntax/charclass.go index 9dc4b630e..b00fc9ad8 100644 --- a/tools/vendor/github.com/dlclark/regexp2/v2/syntax/charclass.go +++ b/tools/vendor/github.com/dlclark/regexp2/v2/syntax/charclass.go @@ -688,11 +688,6 @@ func canonicalUnicodeCatName(catName string) (string, bool) { return "", false } -func isValidUnicodeCat(catName string) bool { - _, ok := canonicalUnicodeCatName(catName) - return ok -} - func (c *CharSet) addCategory(categoryName string, negate, caseInsensitive bool) { var ok bool categoryName, ok = canonicalUnicodeCatName(categoryName) @@ -719,28 +714,19 @@ func (c *CharSet) addCaseEquivalences() { if c.anything { return } - for i := 0; i < len(c.ranges); i++ { + rangeCount := len(c.ranges) + for i := 0; i < rangeCount; i++ { r := c.ranges[i] - if r.First == r.Last { - equiv := tryFindCaseEquivalences(r.First) + // For a single range that's in the set, adds any additional ranges + // necessary to ensure that lowercase equivalents are also included. + for i := r.First; i <= r.Last; i++ { + equiv := tryFindCaseEquivalences(i) for _, eq := range equiv { - c.addChar(eq) + c.ranges = append(c.ranges, SingleRange{First: eq, Last: eq}) } - } else { - c.addCaseEquivalenceRange(r.First, r.Last) - } - } -} - -// For a single range that's in the set, adds any additional ranges -// necessary to ensure that lowercase equivalents are also included. -func (c *CharSet) addCaseEquivalenceRange(chMin, chMax rune) { - for i := chMin; i <= chMax; i++ { - equiv := tryFindCaseEquivalences(i) - for _, eq := range equiv { - c.addChar(eq) } } + c.canonicalize() } // Performs a fast lookup which determines if a character is involved in case conversion, as well as @@ -1141,7 +1127,7 @@ func (c *CharSet) addLowercaseRange(chMin, chMax rune) { } if chMinT < chMin || chMaxT > chMax { - c.addRange(chMinT, chMaxT) + c.ranges = append(c.ranges, SingleRange{First: chMinT, Last: chMaxT}) } } } diff --git a/tools/vendor/github.com/firefart/nonamedreturns/analyzer/analyzer.go b/tools/vendor/github.com/firefart/nonamedreturns/analyzer/analyzer.go index a61899f0e..04abc2699 100644 --- a/tools/vendor/github.com/firefart/nonamedreturns/analyzer/analyzer.go +++ b/tools/vendor/github.com/firefart/nonamedreturns/analyzer/analyzer.go @@ -27,7 +27,7 @@ func flags() flag.FlagSet { return fs } -func run(pass *analysis.Pass) (interface{}, error) { +func run(pass *analysis.Pass) (any, error) { reportErrorInDefer := pass.Analyzer.Flags.Lookup(FlagReportErrorInDefer).Value.String() == "true" errorType := types.Universe.Lookup("error").Type() @@ -67,26 +67,40 @@ func run(pass *analysis.Pass) (interface{}, error) { return } - resultsList := funcResults.List + // deferUsed and assigned are computed lazily and at most once per + // function: the relatively expensive body walk only happens when there + // is an error-typed named return whose defer exemption we need to check. + var deferUsed, assigned map[types.Object]bool - for _, p := range resultsList { + for _, p := range funcResults.List { if len(p.Names) == 0 { // all good, the parameter is not named continue } + isError := types.Identical(pass.TypesInfo.TypeOf(p.Type), errorType) + for _, n := range p.Names { if n.Name == "_" { continue } - if !reportErrorInDefer && - types.Identical(pass.TypesInfo.TypeOf(p.Type), errorType) && - findDeferWithVariableAssignment(funcBody, pass.TypesInfo, pass.TypesInfo.ObjectOf(n)) { - continue + // A named error return is allowed when it is referenced inside a defer + // (e.g. to inspect or modify it before returning) as long as it is also + // assigned somewhere in the function body. The assignment may happen + // inside the defer itself or anywhere else in the function. + if !reportErrorInDefer && isError { + if deferUsed == nil { + deferUsed, assigned = collectDeferUsageAndAssignments(funcBody, pass.TypesInfo) + } + + obj := pass.TypesInfo.ObjectOf(n) + if deferUsed[obj] && assigned[obj] { + continue + } } - pass.Reportf(node.Pos(), "named return %q with type %q found", n.Name, types.ExprString(p.Type)) + pass.Reportf(n.Pos(), "named return %q with type %q found", n.Name, types.ExprString(p.Type)) } } }) @@ -94,50 +108,44 @@ func run(pass *analysis.Pass) (interface{}, error) { return nil, nil // nolint:nilnil } -func findDeferWithVariableAssignment(body *ast.BlockStmt, info *types.Info, variable types.Object) bool { - found := false +// collectDeferUsageAndAssignments walks body a single time and returns: +// - deferUsed: objects referenced (read or written) inside a deferred func literal +// - assigned: objects that appear on the left-hand side of an assignment +// anywhere in the body, including inside a deferred func literal +// +// Variable shadowing is handled naturally: a shadowed declaration introduces a +// distinct types.Object, so it does not match the outer named return. +func collectDeferUsageAndAssignments(body *ast.BlockStmt, info *types.Info) (map[types.Object]bool, map[types.Object]bool) { + deferUsed := make(map[types.Object]bool) + assigned := make(map[types.Object]bool) ast.Inspect(body, func(node ast.Node) bool { - if found { - return false // stop inspection - } - - if d, ok := node.(*ast.DeferStmt); ok { - if fn, ok2 := d.Call.Fun.(*ast.FuncLit); ok2 { - if findVariableAssignment(fn.Body, info, variable) { - found = true - return false + switch n := node.(type) { + case *ast.AssignStmt: + for _, lh := range n.Lhs { + if i, ok := lh.(*ast.Ident); ok { + if obj := info.ObjectOf(i); obj != nil { + assigned[obj] = true + } } } - } - - return true - }) - - return found -} - -func findVariableAssignment(body *ast.BlockStmt, info *types.Info, variable types.Object) bool { - found := false - - ast.Inspect(body, func(node ast.Node) bool { - if found { - return false // stop inspection - } - - if a, ok := node.(*ast.AssignStmt); ok { - for _, lh := range a.Lhs { - if i, ok2 := lh.(*ast.Ident); ok2 { - if info.ObjectOf(i) == variable { - found = true - return false + case *ast.DeferStmt: + if fn, ok := n.Call.Fun.(*ast.FuncLit); ok { + ast.Inspect(fn.Body, func(inner ast.Node) bool { + if i, ok := inner.(*ast.Ident); ok { + if obj := info.ObjectOf(i); obj != nil { + deferUsed[obj] = true + } } - } + return true + }) } } + // keep descending so assignments (and nested defers) inside a deferred + // closure are still collected by the outer walk return true }) - return found + return deferUsed, assigned } diff --git a/tools/vendor/golang.org/x/mod/modfile/read.go b/tools/vendor/golang.org/x/mod/modfile/read.go index 504a2f1df..5b528c718 100644 --- a/tools/vendor/golang.org/x/mod/modfile/read.go +++ b/tools/vendor/golang.org/x/mod/modfile/read.go @@ -9,6 +9,7 @@ import ( "errors" "fmt" "os" + "slices" "strconv" "strings" "unicode" @@ -105,8 +106,7 @@ func (x *FileSyntax) addLine(hint Expr, tokens ...string) *Line { if hint == nil { // If no hint given, add to the last statement of the given type. Loop: - for i := len(x.Stmt) - 1; i >= 0; i-- { - stmt := x.Stmt[i] + for _, stmt := range slices.Backward(x.Stmt) { switch stmt := stmt.(type) { case *Line: if stmt.Token != nil && stmt.Token[0] == tokens[0] { @@ -718,9 +718,7 @@ func (in *input) assignComments() { } // Assign suffix comments to syntax immediately before. - for i := len(in.post) - 1; i >= 0; i-- { - x := in.post[i] - + for _, x := range slices.Backward(in.post) { start, end := x.Span() if debug { fmt.Fprintf(os.Stderr, "post %T :%d:%d #%d :%d:%d #%d\n", x, start.Line, start.LineRune, start.Byte, end.Line, end.LineRune, end.Byte) diff --git a/tools/vendor/golang.org/x/mod/modfile/rule.go b/tools/vendor/golang.org/x/mod/modfile/rule.go index c5b8305de..9ab203b56 100644 --- a/tools/vendor/golang.org/x/mod/modfile/rule.go +++ b/tools/vendor/golang.org/x/mod/modfile/rule.go @@ -327,6 +327,7 @@ func parseToFile(file string, data []byte, fix VersionFixer, strict bool) (parse } var GoVersionRE = lazyregexp.New(`^([1-9][0-9]*)\.(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))?([a-z]+[0-9]+)?$`) + var laxGoVersionRE = lazyregexp.New(`^v?(([1-9][0-9]*)\.(0|[1-9][0-9]*))([^0-9].*)$`) // Toolchains must be named beginning with `go1`, @@ -1272,6 +1273,17 @@ func (f *File) SetRequire(req []*Require) { // SetRequireSeparateIndirect will split it into a direct-only and indirect-only // block. This aids in the transition to separate blocks. func (f *File) SetRequireSeparateIndirect(req []*Require) { + f.setRequireSeparateIndirect(req, false) +} + +// SetRequireAtMostTwo is like SetRequireSeparateIndirect but it aggressively +// consolidates all requirements into at most two blocks (one direct, one indirect). +// It ignores existing blocks and comments when deciding where to place requirements. +func (f *File) SetRequireAtMostTwo(req []*Require) { + f.setRequireSeparateIndirect(req, true) +} + +func (f *File) setRequireSeparateIndirect(req []*Require, simplify bool) { // hasComments returns whether a line or block has comments // other than "indirect". hasComments := func(c Comments) bool { @@ -1304,6 +1316,17 @@ func (f *File) SetRequireSeparateIndirect(req []*Require) { } // Examine existing require lines and blocks. + need := make(map[string]*Require) + for _, r := range req { + need[r.Mod.Path] = r + } + lineIndirect := make(map[*Line]bool) + for _, r := range f.Require { + if n := need[r.Mod.Path]; n != nil { + lineIndirect[r.Syntax] = n.Indirect + } + } + var ( // We may insert new requirements into the last uncommented // direct-only and indirect-only blocks. We may also move requirements @@ -1321,7 +1344,9 @@ func (f *File) SetRequireSeparateIndirect(req []*Require) { // Track the block each requirement belongs to (if any) so we can // move them later. - lineToBlock = make(map[*Line]*LineBlock) + lineToBlock = make(map[*Line]*LineBlock) + directBlockComments []Comment + indirectBlockComments []Comment ) for i, stmt := range f.Syntax.Stmt { switch stmt := stmt.(type) { @@ -1364,6 +1389,24 @@ func (f *File) SetRequireSeparateIndirect(req []*Require) { if allIndirect { lastIndirectIndex = i } + if simplify { + anyDirect := false + for _, line := range stmt.Line { + if ind, ok := lineIndirect[line]; ok && !ind { + anyDirect = true + break + } + } + target := &directBlockComments + if !anyDirect && len(stmt.Line) > 0 { + target = &indirectBlockComments + } + if len(*target) > 0 && len(stmt.Comments.Before) > 0 { + *target = append(*target, Comment{Token: "//"}) + } + *target = append(*target, stmt.Comments.Before...) + stmt.Comments.Before = nil + } } } @@ -1422,6 +1465,15 @@ func (f *File) SetRequireSeparateIndirect(req []*Require) { lastIndirectBlock = ensureBlock(lastIndirectIndex) } + if simplify { + if len(directBlockComments) > 0 { + lastDirectBlock.Comments.Before = append(lastDirectBlock.Comments.Before, directBlockComments...) + } + if len(indirectBlockComments) > 0 { + lastIndirectBlock.Comments.Before = append(lastIndirectBlock.Comments.Before, indirectBlockComments...) + } + } + // Delete requirements we don't want anymore. // Update versions and indirect comments on requirements we want to keep. // If a requirement is in last{Direct,Indirect}Block with the wrong @@ -1430,10 +1482,6 @@ func (f *File) SetRequireSeparateIndirect(req []*Require) { // correct block. // // Some blocks may be empty after this. Cleanup will remove them. - need := make(map[string]*Require) - for _, r := range req { - need[r.Mod.Path] = r - } have := make(map[string]*Require) for _, r := range f.Require { path := r.Mod.Path @@ -1446,10 +1494,10 @@ func (f *File) SetRequireSeparateIndirect(req []*Require) { r.setVersion(need[path].Mod.Version) r.setIndirect(need[path].Indirect) if need[path].Indirect && - (oneFlatUncommentedBlock || lineToBlock[r.Syntax] == lastDirectBlock) { + (simplify || oneFlatUncommentedBlock || lineToBlock[r.Syntax] == lastDirectBlock) { moveReq(r, lastIndirectBlock) } else if !need[path].Indirect && - (oneFlatUncommentedBlock || lineToBlock[r.Syntax] == lastIndirectBlock) { + (simplify || oneFlatUncommentedBlock || lineToBlock[r.Syntax] == lastIndirectBlock) { moveReq(r, lastDirectBlock) } } @@ -1736,8 +1784,7 @@ func removeDups(syntax *FileSyntax, exclude *[]*Exclude, replace *[]*Replace, to // Remove duplicate replacements. // Later replacements take priority over earlier ones. haveReplace := make(map[module.Version]bool) - for i := len(*replace) - 1; i >= 0; i-- { - x := (*replace)[i] + for _, x := range slices.Backward(*replace) { if haveReplace[x.Old] { kill[x.Syntax] = true continue diff --git a/tools/vendor/golang.org/x/sync/errgroup/errgroup.go b/tools/vendor/golang.org/x/sync/errgroup/errgroup.go index f69fd7546..c261a8ebb 100644 --- a/tools/vendor/golang.org/x/sync/errgroup/errgroup.go +++ b/tools/vendor/golang.org/x/sync/errgroup/errgroup.go @@ -109,7 +109,7 @@ func (g *Group) TryGo(f func() error) bool { if g.sem != nil { select { case g.sem <- token{}: - // Note: this allows barging iff channels in general allow barging. + // Note: this allows barging if and only if channels in general allow barging. default: return false } diff --git a/tools/vendor/golang.org/x/sync/semaphore/semaphore.go b/tools/vendor/golang.org/x/sync/semaphore/semaphore.go index b618162aa..040c5bc50 100644 --- a/tools/vendor/golang.org/x/sync/semaphore/semaphore.go +++ b/tools/vendor/golang.org/x/sync/semaphore/semaphore.go @@ -83,7 +83,7 @@ func (s *Weighted) Acquire(ctx context.Context, n int64) error { default: isFront := s.waiters.Front() == elem s.waiters.Remove(elem) - // If we're at the front and there're extra tokens left, notify other waiters. + // If we're at the front and there are extra tokens left, notify other waiters. if isFront && s.size > s.cur { s.notifyWaiters() } @@ -139,15 +139,15 @@ func (s *Weighted) notifyWaiters() { w := next.Value.(waiter) if s.size-s.cur < w.n { - // Not enough tokens for the next waiter. We could keep going (to try to + // Not enough tokens for the next waiter. We could keep going (to try to // find a waiter with a smaller request), but under load that could cause // starvation for large requests; instead, we leave all remaining waiters // blocked. // // Consider a semaphore used as a read-write lock, with N tokens, N - // readers, and one writer. Each reader can Acquire(1) to obtain a read - // lock. The writer can Acquire(N) to obtain a write lock, excluding all - // of the readers. If we allow the readers to jump ahead in the queue, + // readers, and one writer. Each reader can Acquire(1) to obtain a read + // lock. The writer can Acquire(N) to obtain a write lock, excluding all + // of the readers. If we allow the readers to jump ahead in the queue, // the writer will starve — there is always one token available for every // reader. break diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux.go index d11d5b96a..526a0d5f4 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -6397,3 +6397,79 @@ const ( MPOL_PREFERRED_MANY = 0x5 MPOL_WEIGHTED_INTERLEAVE = 0x6 ) + +const ( + GPIO_V2_GET_LINEINFO_IOCTL = 0xc100b405 + GPIO_V2_GET_LINE_IOCTL = 0xc250b407 + GPIO_V2_LINE_GET_VALUES_IOCTL = 0xc010b40e + GPIO_V2_LINE_SET_VALUES_IOCTL = 0xc010b40f + GPIO_V2_GET_LINEINFO_WATCH_IOCTL = 0xc100b406 + GPIO_GET_LINEINFO_UNWATCH_IOCTL = 0xc004b40c +) +const ( + GPIO_V2_LINE_ATTR_ID_FLAGS = 0x1 + GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES = 0x2 + GPIO_V2_LINE_ATTR_ID_DEBOUNCE = 0x3 + GPIO_V2_LINE_CHANGED_REQUESTED = 0x1 + GPIO_V2_LINE_CHANGED_RELEASED = 0x2 + GPIO_V2_LINE_CHANGED_CONFIG = 0x3 + GPIO_V2_LINE_EVENT_RISING_EDGE = 0x1 + GPIO_V2_LINE_EVENT_FALLING_EDGE = 0x2 +) + +type GPIOChipInfo struct { + Name [32]byte + Label [32]byte + Lines uint32 +} +type GPIOV2LineValues struct { + Bits uint64 + Mask uint64 +} +type GPIOV2LineAttribute struct { + Id uint32 + _ uint32 + Flags uint64 +} +type GPIOV2LineConfigAttribute struct { + Attr GPIOV2LineAttribute + Mask uint64 +} +type GPIOV2LineConfig struct { + Flags uint64 + Num_attrs uint32 + _ [5]uint32 + Attrs [10]GPIOV2LineConfigAttribute +} +type GPIOV2LineRequest struct { + Offsets [64]uint32 + Consumer [32]byte + Config GPIOV2LineConfig + Num_lines uint32 + Event_buffer_size uint32 + _ [5]uint32 + Fd int32 +} +type GPIOV2LineInfo struct { + Name [32]byte + Consumer [32]byte + Offset uint32 + Num_attrs uint32 + Flags uint64 + Attrs [10]GPIOV2LineAttribute + _ [4]uint32 +} +type GPIOV2LineInfoChanged struct { + Info GPIOV2LineInfo + Timestamp_ns uint64 + Event_type uint32 + _ [5]uint32 +} +type GPIOV2LineEvent struct { + Timestamp_ns uint64 + Id uint32 + Offset uint32 + Seqno uint32 + Line_seqno uint32 + _ [6]uint32 +} diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index 97ef790de..aede1de7f 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -711,3 +711,7 @@ type SysvShmDesc struct { _ uint32 _ uint32 } + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x8044b401 +) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index 90b50da68..bb3bc4dc2 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -725,3 +725,7 @@ type SysvShmDesc struct { _ uint64 _ uint64 } + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x8044b401 +) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index acda13685..1fdf4c517 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -705,3 +705,7 @@ type SysvShmDesc struct { _ uint32 _ uint32 } + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x8044b401 +) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index ef7a99e1f..063e6f0b4 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -704,3 +704,7 @@ type SysvShmDesc struct { _ uint64 _ uint64 } + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x8044b401 +) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go index 966063dfc..9cf836c70 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go @@ -705,3 +705,7 @@ type SysvShmDesc struct { _ uint64 _ uint64 } + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x8044b401 +) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index dc53b20b7..1d222fcb3 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -710,3 +710,7 @@ type SysvShmDesc struct { Ctime_high uint16 _ uint16 } + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x4044b401 +) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index 9ad0aa8c3..912cc4ab6 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -707,3 +707,7 @@ type SysvShmDesc struct { _ uint64 _ uint64 } + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x4044b401 +) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index 29d55493d..1e358ef34 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -707,3 +707,7 @@ type SysvShmDesc struct { _ uint64 _ uint64 } + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x4044b401 +) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index a4d9e1584..df59f32f5 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -710,3 +710,7 @@ type SysvShmDesc struct { Ctime_high uint16 _ uint16 } + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x4044b401 +) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go index f8a297771..29355aa0b 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go @@ -718,3 +718,7 @@ type SysvShmDesc struct { _ uint32 _ [4]byte } + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x4044b401 +) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index 4158d6c4e..c6083a15d 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -713,3 +713,7 @@ type SysvShmDesc struct { _ uint64 _ uint64 } + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x4044b401 +) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index 1035af49f..6321cc762 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -713,3 +713,7 @@ type SysvShmDesc struct { _ uint64 _ uint64 } + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x4044b401 +) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index 2297125d3..b44f402fe 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -792,3 +792,7 @@ const ( RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE = 0x6 RISCV_HWPROBE_WHICH_CPUS = 0x1 ) + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x8044b401 +) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go index 8481e9bd9..b22c795a6 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -727,3 +727,7 @@ type SysvShmDesc struct { _ uint64 _ uint64 } + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x8044b401 +) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go index a6828a031..0b18075b5 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go @@ -708,3 +708,7 @@ type SysvShmDesc struct { _ uint64 _ uint64 } + +const ( + GPIO_GET_CHIPINFO_IOCTL = 0x4044b401 +) diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/composite/composite.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/composite/composite.go index ed2284e63..f80e393ad 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/composite/composite.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/composite/composite.go @@ -10,6 +10,7 @@ import ( "fmt" "go/ast" "go/types" + "slices" "strings" "golang.org/x/tools/go/analysis" @@ -49,108 +50,88 @@ func init() { Analyzer.Flags.BoolVar(&whitelist, "whitelist", whitelist, "use composite white list; for testing only") } -// runUnkeyedLiteral checks if a composite literal is a struct literal with -// unkeyed fields. func run(pass *analysis.Pass) (any, error) { inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) - nodeFilter := []ast.Node{ - (*ast.CompositeLit)(nil), - } - inspect.Preorder(nodeFilter, func(n ast.Node) { - cl := n.(*ast.CompositeLit) + for curLit := range inspect.Root().Preorder((*ast.CompositeLit)(nil)) { + complit := curLit.Node().(*ast.CompositeLit) + + // Skip empty or partly/fully keyed literals. + if len(complit.Elts) == 0 || + slices.ContainsFunc(complit.Elts, func(e ast.Expr) bool { return is[*ast.KeyValueExpr](e) }) { + continue + } - typ := pass.TypesInfo.Types[cl].Type + // Find struct type. + // (For a type parameter, choose an arbitrary term.) + typ := pass.TypesInfo.Types[complit].Type if typ == nil { - // cannot determine composite literals' type, skip it - return + continue // no type info } - typeName := typ.String() - if whitelist && unkeyedLiteral[typeName] { - // skip whitelisted types - return + terms, err := typeparams.NormalTerms(typ) + if err != nil || len(terms) == 0 { + continue // invalid or empty type } - var structuralTypes []types.Type - switch typ := types.Unalias(typ).(type) { - case *types.TypeParam: - terms, err := typeparams.StructuralTerms(typ) - if err != nil { - return // invalid type - } - for _, term := range terms { - structuralTypes = append(structuralTypes, term.Type()) - } - default: - structuralTypes = append(structuralTypes, typ) + t := terms[0].Type() + strct, ok := typeparams.Deref(t).Underlying().(*types.Struct) + if !ok { + continue // not a struct literal + } + if isSamePackageType(pass, t) { + continue // allow unkeyed literals for structs in same package } - for _, typ := range structuralTypes { - strct, ok := typeparams.Deref(typ).Underlying().(*types.Struct) - if !ok { - // skip non-struct composite literals - continue - } - if isLocalType(pass, typ) { - // allow unkeyed locally defined composite literal - continue - } + // Allow whitelisted types. + typeName := typ.String() + if whitelist && unkeyedLiteral[typeName] { + continue + } - // check if the struct contains an unkeyed field - allKeyValue := true - var suggestedFixAvailable = len(cl.Elts) == strct.NumFields() - var missingKeys []analysis.TextEdit - for i, e := range cl.Elts { - if _, ok := e.(*ast.KeyValueExpr); !ok { - allKeyValue = false - if i >= strct.NumFields() { - break - } - field := strct.Field(i) - if !field.Exported() { - // Adding unexported field names for structs not defined - // locally will not work. - suggestedFixAvailable = false - break - } - missingKeys = append(missingKeys, analysis.TextEdit{ - Pos: e.Pos(), - End: e.Pos(), - NewText: fmt.Appendf(nil, "%s: ", field.Name()), - }) + // If there is one value per field, + // offer to fill in the field names. + var fixes []analysis.SuggestedFix + if len(complit.Elts) == strct.NumFields() { + var edits []analysis.TextEdit + for i, elt := range complit.Elts { + field := strct.Field(i) + // We cannot fill in the name of an + // exported field from another package. + if !field.Exported() { + edits = nil + break } + edits = append(edits, analysis.TextEdit{ + Pos: elt.Pos(), + End: elt.Pos(), + NewText: fmt.Appendf(nil, "%s: ", field.Name()), + }) } - if allKeyValue { - // all the struct fields are keyed - continue - } - - diag := analysis.Diagnostic{ - Pos: cl.Pos(), - End: cl.End(), - Message: fmt.Sprintf("%s struct literal uses unkeyed fields", typeName), - } - if suggestedFixAvailable { - diag.SuggestedFixes = []analysis.SuggestedFix{{ + if edits != nil { + fixes = []analysis.SuggestedFix{{ Message: "Add field names to struct literal", - TextEdits: missingKeys, + TextEdits: edits, }} } - pass.Report(diag) - return } - }) + + pass.Report(analysis.Diagnostic{ + Pos: complit.Pos(), + End: complit.End(), + Message: fmt.Sprintf("%s struct literal uses unkeyed fields", typeName), + SuggestedFixes: fixes, + }) + } return nil, nil } -// isLocalType reports whether typ belongs to the same package as pass. -// TODO(adonovan): local means "internal to a function"; rename to isSamePackageType. -func isLocalType(pass *analysis.Pass, typ types.Type) bool { +// isSamePackageType reports whether typ belongs to the same package as pass. +func isSamePackageType(pass *analysis.Pass, typ types.Type) bool { switch x := types.Unalias(typ).(type) { case *types.Struct: // struct literals are local types return true case *types.Pointer: - return isLocalType(pass, x.Elem()) + return isSamePackageType(pass, x.Elem()) case interface{ Obj() *types.TypeName }: // *Named or *TypeParam (aliases were removed already) // names in package foo are local to foo_test too return x.Obj().Pkg() != nil && @@ -158,3 +139,8 @@ func isLocalType(pass *analysis.Pass, typ types.Type) bool { } return false } + +func is[T any](x any) bool { + _, ok := x.(T) + return ok +} diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/errorsas/errorsas.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/errorsas/errorsas.go index 36076cd48..eb4373daf 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/errorsas/errorsas.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/errorsas/errorsas.go @@ -23,7 +23,7 @@ of the second argument is not a pointer to a type implementing error. For example: var unwrappedErr net.DNSError - errors.As(err, unwrappedErr) // should use &unwrappedErr, DNSError.Error has a pointer reciever + errors.As(err, unwrappedErr) // should use &unwrappedErr, DNSError.Error has a pointer receiver ` var Analyzer = &analysis.Analyzer{ diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/inline/doc.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/inline/doc.go index 8b817a702..fea596b9e 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/inline/doc.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/inline/doc.go @@ -10,7 +10,12 @@ and uses of constants marked with a "//go:fix inline" directive. inline: apply fixes based on 'go:fix inline' comment directives -The inline analyzer inlines functions and constants that are marked for inlining. +The inline analyzer inlines functions, constants, and type aliases +that are marked for inlining. + +Use this command to apply (just) inline fixes en masse: + + $ go fix -inline ./... ## Functions @@ -61,12 +66,6 @@ inliner machinery is capable of replacing f by a function literal, func(){...}(). However, the inline analyzer discards all such "literalizations" unconditionally, again on grounds of style.) -A call to a function F from its dedicated test (TestF) is not inlined, -since the purpose of the test is to exercise F itself, even when -it's a deprecated function to which other calls should be inlined. -This is not true for type aliases; see https://go.dev/issue/79271. -See further discussion in https://go.dev/issue/79272. - ## Constants Given a constant that is marked for inlining, like this one: @@ -96,14 +95,30 @@ or before a group, applying to every constant in the group: //go:fix inline const ( Ptr = Pointer - Val = Value + Val = Value ) -The proposal https://go.dev/issue/32816 introduces the "//go:fix inline" directives. +## Type aliases + +Similar to named constants, a type alias can also be marked for inlining: + + //go:fix inline + type A = newpkg.A + +The analyzer will replace all references to the annotated type +(A) by the type on the right-hand side of the declaration (newpkg.A). + +## Tests -You can use this command to apply inline fixes en masse: +A use of a function, named constant, or type alias X from its +dedicated test (TestX), is not inlined, since the purpose of the test +is to exercise X itself, even if it is deprecated and other uses of it +should be inlined. +This applies to benchmarks and examples too, and follows the usual +conventions of test function naming. - $ go run golang.org/x/tools/go/analysis/passes/inline/cmd/inline@latest -fix ./... +Similarly, if the symbol X is declared in a file named foo.go, any use +of it within a file named foo_test.go will also not be inlined. # Analyzer gofixdirective diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/inline/inline.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/inline/inline.go index 890f4adf6..d16e0d0b6 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/inline/inline.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/inline/inline.go @@ -150,11 +150,11 @@ func (a *analyzer) inline() { a.inlineCall(n, cur) case *ast.Ident: - switch t := a.pass.TypesInfo.Uses[n].(type) { + switch obj := a.pass.TypesInfo.Uses[n].(type) { case *types.TypeName: - a.inlineAlias(t, cur) + a.inlineAlias(obj, cur) case *types.Const: - a.inlineConst(t, cur) + a.inlineConst(obj, cur) } } } @@ -252,11 +252,22 @@ func (a *analyzer) inlineCall(call *ast.CallExpr, cur inspector.Cursor) { } } -// withinTestOf reports whether cur is within a dedicated test -// function for the inlinable target function. +// withinTestOf reports whether curUse is within a dedicated test +// function for the inlinable target symbol. // A call within its dedicated test should not be inlined. -func (a *analyzer) withinTestOf(cur inspector.Cursor, target *types.Func) bool { - curFuncDecl, ok := moreiters.First(cur.Enclosing((*ast.FuncDecl)(nil))) +func (a *analyzer) withinTestOf(curUse inspector.Cursor, target types.Object) bool { + // x_test.go -> x + useFileBase, isTest := strings.CutSuffix(a.pass.Fset.File(curUse.Node().Pos()).Name(), "_test.go") + if !isTest { + return false // not a test file + } + + // Suppress fixes for uses in x_test.go of target symbol defined in x.go (#79272). + if useFileBase == strings.TrimSuffix(a.pass.Fset.File(target.Pos()).Name(), ".go") { + return true + } + + curFuncDecl, ok := moreiters.First(curUse.Enclosing((*ast.FuncDecl)(nil))) if !ok { return false // not in a function } @@ -267,23 +278,22 @@ func (a *analyzer) withinTestOf(cur inspector.Cursor, target *types.Func) bool { if strings.TrimSuffix(a.pass.Pkg.Path(), "_test") != target.Pkg().Path() { return false // different package } - if !strings.HasSuffix(a.pass.Fset.File(funcDecl.Pos()).Name(), "_test.go") { - return false // not a test file - } - // Computed expected SYMBOL portion of "TestSYMBOL_comment" - // for the target symbol. + // Computed expected SYMBOL portion of "ExampleSYMBOL_comment" + // for the target symbol. (Strictly, this convention applies + // only to Example functions.) + // TODO(adonovan): use a proper Test function parser. symbol := target.Name() - if recv := target.Signature().Recv(); recv != nil { - _, named := typesinternal.ReceiverNamed(recv) - symbol = named.Obj().Name() + "_" + symbol + if fn, ok := target.(*types.Func); ok { + if recv := fn.Signature().Recv(); recv != nil { + _, named := typesinternal.ReceiverNamed(recv) + symbol = named.Obj().Name() + "_" + symbol + } } - - // TODO(adonovan): use a proper Test function parser. fname := funcDecl.Name.Name - for _, pre := range []string{"Test", "Example", "Bench"} { + for _, pre := range []string{"Test", "Example", "Bench", "Fuzz"} { if fname == pre+symbol || strings.HasPrefix(fname, pre+symbol+"_") { - return true + return true // use of X within TestX } } @@ -304,6 +314,10 @@ func (a *analyzer) inlineAlias(tn *types.TypeName, curId inspector.Cursor) { return // nope } + if a.withinTestOf(curId, tn) { + return // don't inline a type alias from within its own test + } + alias := tn.Type().(*types.Alias) // Remember the names of the alias's type params. When we check for shadowing // later, we'll ignore these because they won't appear in the replacement text. @@ -508,6 +522,10 @@ func (a *analyzer) inlineConst(con *types.Const, cur inspector.Cursor) { return // nope } + if a.withinTestOf(cur, con) { + return // don't inline a type alias from within its own test + } + // If n is qualified by a package identifier, we'll need the full selector expression. curFile := astutil.EnclosingFile(cur) n := cur.Node().(*ast.Ident) diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/embedlit.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/embedlit.go index f68723978..da883d67c 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/embedlit.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/embedlit.go @@ -5,9 +5,12 @@ package modernize import ( + "bytes" "fmt" "go/ast" + "go/token" "go/types" + "slices" "strings" "golang.org/x/tools/go/analysis" @@ -15,8 +18,10 @@ import ( "golang.org/x/tools/go/ast/edge" "golang.org/x/tools/go/ast/inspector" "golang.org/x/tools/internal/analysis/analyzerutil" + typeindexanalyzer "golang.org/x/tools/internal/analysis/typeindex" "golang.org/x/tools/internal/astutil" "golang.org/x/tools/internal/moreiters" + "golang.org/x/tools/internal/typesinternal/typeindex" "golang.org/x/tools/internal/versions" ) @@ -25,94 +30,367 @@ var EmbedLitAnalyzer = &analysis.Analyzer{ Doc: analyzerutil.MustExtractDoc(doc, "embedlit"), Requires: []*analysis.Analyzer{ inspect.Analyzer, + typeindexanalyzer.Analyzer, }, Run: runEmbedLit, URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize#embedlit", } -// TODO(mkalil): Handle other patterns such as: -// t := T{...} -// t.x = x -// ... -// => -// t := T{..., x: x, ...} +// Go1.27 introduced the ability to directly access embedded struct fields. +// The embedlit modernizer suggests two types of fixes that use this feature: +// 1. Removing redundant field type specifiers in embedded struct fields. +// 2. Moving embedded struct field assignments inside of the struct literal +// initialization. func runEmbedLit(pass *analysis.Pass) (any, error) { var ( inspect = pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) + index = pass.ResultOf[typeindexanalyzer.Analyzer].(*typeindex.Index) info = pass.TypesInfo ) for curLit := range inspect.Root().Preorder((*ast.CompositeLit)(nil)) { - var ( - edits []analysis.TextEdit - names []string // names of the embedded field types that can be removed - compLit = curLit.Node().(*ast.CompositeLit) - compLitType = info.TypeOf(compLit) - check func(*ast.CompositeLit) - ) - check = func(lit *ast.CompositeLit) { - for _, elt := range lit.Elts { - // Can't promote an unkeyed field; would result in a syntax error. - if kv, ok := elt.(*ast.KeyValueExpr); ok { - if innerLit := isEmbeddedFieldLit(info, compLitType, kv); innerLit != nil { - // Emit edits to delete the unnecessary embedded field type specifier - // and its closing brace. - closingPos := innerLit.Rbrace - if len(innerLit.Elts) > 0 { - // Delete any inner trailing commas or white space. Extra trailing commas - // would result in invalid code. - closingPos = innerLit.Elts[len(innerLit.Elts)-1].End() - } - file := astutil.EnclosingFile(curLit) - // Enable modernizer only for Go1.27. - if !analyzerutil.FileUsesGoVersion(pass, file, versions.Go1_27) { - return - } - // If any comments overlap with the range to delete, don't suggest a fix. - if !moreiters.Empty(astutil.Comments(file, closingPos, innerLit.Rbrace+1)) { - continue + if curLit.ParentEdgeKind() != edge.KeyValueExpr_Value { // non-nested comp lit + // TODO(mkalil): Figure out how to handle addition/removal of commas in + // the comp lit when we observe code where both patterns apply. (This will + // likely require a significant amount of work). For now, only apply edits + // from one pattern at a time. + if !embedlitUnnest(pass, info, curLit) { + err := embedlitCombine(pass, index, info, curLit) // calls pass.ReadFile + if err != nil { + return nil, err + } + } + } + } + return nil, nil +} + +// Pattern A: removing unneeded embedded field type specifier from the struct +// literal. +// T{U: U{f: v, ...}} => T{f: v, ...} +// It returns true if it reported a diagnostic with edits. +func embedlitUnnest(pass *analysis.Pass, info *types.Info, curLit inspector.Cursor) bool { + var ( + edits []analysis.TextEdit + names []string // names of the embedded field types that can be removed + lit = curLit.Node().(*ast.CompositeLit) + compLitType = info.TypeOf(lit) + ) + + // checkLit determines whether any of the fields in the given struct literal can + // be promoted, and calculates the corresponding edits. + var checkLit func(lit *ast.CompositeLit) + checkLit = func(lit *ast.CompositeLit) { + for i, elt := range lit.Elts { + // Can't promote an unkeyed field; would result in a syntax error. + if kv, ok := elt.(*ast.KeyValueExpr); ok { + if innerLit := isEmbeddedFieldLit(info, compLitType, kv); innerLit != nil { + // Emit edits to delete the unnecessary embedded field type specifier + // and its closing brace. + closingPos := innerLit.Rbrace + if len(innerLit.Elts) > 0 { + // Delete any inner trailing commas or white space. Extra trailing commas + // would result in invalid code. + closingPos = innerLit.Elts[len(innerLit.Elts)-1].End() + } + file := astutil.EnclosingFile(curLit) + // Enable modernizer only for Go1.27. + if !analyzerutil.FileUsesGoVersion(pass, file, versions.Go1_27) { + return + } + // If any comments overlap with the range to delete, don't suggest a fix. + if !moreiters.Empty(astutil.Comments(file, kv.Pos(), innerLit.Lbrace+1)) || + !moreiters.Empty(astutil.Comments(file, closingPos, innerLit.Rbrace+1)) { + continue + } + // Delete starting from the key to the character right after the + // opening brace of the inner literal: + // T{U: U{f: v, ...}} + // ----- + startPos := kv.Pos() + endPos := innerLit.Lbrace + 1 + + // Delete the entire line if the key and its opening brace are + // together on their own line. This prevents leaving behind unneeded + // blank lines inside struct literals that `gofmt` will not remove. + // T{ + // U: U{ <- delete entire line + // f: v, + // } + // } + // + tokFile := pass.Fset.File(kv.Pos()) + lineOf := func(pos token.Pos) int { + return tokFile.PositionFor(pos, false).Line + } + curLine := lineOf(kv.Pos()) + var prevLine int + if i == 0 { + // First element, so the previous line is the parent lbrace. + prevLine = lineOf(lit.Lbrace) + } else { + prevLine = lineOf(lit.Elts[i-1].End()) + } + + // We can safely delete the entire line if the key value expression is + // on a different line than the previous element, and the closing + // brace of the inner literal is on a different line than its opening + // brace. + if prevLine < curLine && curLine < tokFile.LineCount() && // (1-based) + lineOf(innerLit.Lbrace) < lineOf(innerLit.Rbrace) { + lineStart := tokFile.LineStart(curLine) + nextLineStart := tokFile.LineStart(curLine + 1) + // Check that there are no comments on the line we are going to delete. + if moreiters.Empty(astutil.Comments(file, lineStart, nextLineStart)) { + startPos = tokFile.LineStart(curLine) + endPos = nextLineStart } - edits = append(edits, []analysis.TextEdit{ - // T{U: U{f: v, ...}} - // ----- - - { - // Delete the key and the opening brace of the inner struct literal. - Pos: kv.Pos(), - End: innerLit.Lbrace + 1, - }, - { - // Delete the corresponding closing brace, including preceding - // white space or commas. Failing to delete trailing commas may - // result in invalid code. - Pos: closingPos, - End: innerLit.Rbrace + 1, - }, - }...) - names = append(names, kv.Key.(*ast.Ident).Name) - check(innerLit) } + + edits = append(edits, []analysis.TextEdit{ + // T{U: U{f: v, ...}} + // ----- - + { + // Delete the key and the opening brace of the inner struct literal. + Pos: startPos, + End: endPos, + }, + { + // Delete the corresponding closing brace, including preceding + // white space or commas. Failing to delete trailing commas may + // result in invalid code. + Pos: closingPos, + End: innerLit.Rbrace + 1, + }, + }...) + names = append(names, kv.Key.(*ast.Ident).Name) + checkLit(innerLit) } } } - - if curLit.ParentEdgeKind() != edge.KeyValueExpr_Value { - compLit := curLit.Node().(*ast.CompositeLit) - check(compLit) // non-nested comp lit - } - if len(edits) > 0 { - pass.Report(analysis.Diagnostic{ - Pos: curLit.Node().Pos(), - End: curLit.Node().End(), - Message: "embedded field type can be removed from struct literal", - SuggestedFixes: []analysis.SuggestedFix{ - { - Message: fmt.Sprintf("Remove embedded field type%s %s", cond(len(names) == 1, "", "s"), strings.Join(names, ", ")), - TextEdits: edits, - }, + } + checkLit(lit) + if len(edits) > 0 { + pass.Report(analysis.Diagnostic{ + Pos: curLit.Node().Pos(), + End: curLit.Node().End(), + Message: "embedded field type can be removed from struct literal", + SuggestedFixes: []analysis.SuggestedFix{ + { + Message: fmt.Sprintf("Remove embedded field type%s %s", cond(len(names) == 1, "", "s"), strings.Join(names, ", ")), + TextEdits: edits, }, + }, + }) + return true + } + return false +} + +// Pattern B: moving embedded field assignments inside the struct literal +// initialization. +// t := T{...}; t.x = x => t := T{..., x: x} +// (or var t = ...) +func embedlitCombine(pass *analysis.Pass, index *typeindex.Index, info *types.Info, curLit inspector.Cursor) error { + compLit := curLit.Node().(*ast.CompositeLit) + if !moreiters.Every(slices.Values(compLit.Elts), func(e ast.Expr) bool { + return is[*ast.KeyValueExpr](e) + }) { + // Promoting additional embedded fields would result in mixing keyed and + // unkeyed fields, which isn't allowed. + return nil + } + var ( + // Ident for "t" in the assignment. + lhs *ast.Ident + // The cursor representing the statement that initializes the comp lit "t". + // We use its siblings to search for field assignments and verify that there + // are no intervening statements, in case those statements observe "t". + curStmt inspector.Cursor + ) + switch curLit.ParentEdgeKind() { + case edge.AssignStmt_Rhs: + assign := curLit.Parent().Node().(*ast.AssignStmt) + // TODO(mkalil): Handle lhs forms that aren't idents, i.e. x.y[i] = T{...}. + if id, ok := assign.Lhs[curLit.ParentEdgeIndex()].(*ast.Ident); ok { + lhs = id + curStmt = curLit.Parent() + } + case edge.ValueSpec_Values: + spec := curLit.Parent().Node().(*ast.ValueSpec) + lhs = spec.Names[curLit.ParentEdgeIndex()] + if decl, ok := moreiters.First(curLit.Enclosing((*ast.DeclStmt)(nil))); ok { + curStmt = decl + } + default: + return nil + } + + if lhs == nil || !curStmt.Valid() { + return nil + } + + var ( + tObj = info.ObjectOf(lhs) + // Marks the contiguous block of embedded field assign statements that will + // be moved into the struct initialization. + firstStmt, lastStmt inspector.Cursor + ) +stmtloop: + for { + var ok bool + curStmt, ok = curStmt.NextSibling() + if !ok { + break // end of (e.g.) block + } + // All embedded field value assignments must immediately follow the struct + // initialization. + assign, ok := curStmt.Node().(*ast.AssignStmt) + if !ok || len(assign.Lhs) != 1 || !(assign.Tok == token.ASSIGN || assign.Tok == token.DEFINE) { + // TODO(mkalil): handle multi-assignments like t.x, t.y = 1, 2 + break + } + expr := assign.Lhs[0] + sel, ok := expr.(*ast.SelectorExpr) + if !ok { + break + } + // Verify that sel.X refers to the same object as "t" + selXId, ok := sel.X.(*ast.Ident) + if !ok { + // TODO(mkalil): handle deeply nested expressions like t.B.x + break + } + obj := info.ObjectOf(selXId) + if obj != tObj { + break + } + rhsCur := curStmt.ChildAt(edge.AssignStmt_Rhs, 0) + if uses(index, rhsCur, tObj) { + break + } + for c := range rhsCur.Preorder((*ast.Ident)(nil)) { + id := c.Node().(*ast.Ident) + // If the rhs uses a value of t (e.g. t.x = t.y), don't suggest a fix because + // we can't evaluate t.y when constructing the new literal. + if info.ObjectOf(id) == tObj { + break stmtloop + } + // Note: we don't need to worry about expressions with side effects + // changing the behavior when moved inside the comp lit. The order of + // effects will be preserved because we preserve the order of the key + // value pairs inside the comp lit. + } + if !firstStmt.Valid() { + firstStmt = curStmt + } + lastStmt = curStmt + } + + if !firstStmt.Valid() { + return nil + } + + file := astutil.EnclosingFile(curLit) + // Enable modernizer only for Go1.27. + if !analyzerutil.FileUsesGoVersion(pass, file, versions.Go1_27) { + return nil + } + + // Read file content to determine if the struct lit has a trailing comma + // after its last element. + tokFile := pass.Fset.File(compLit.Rbrace) + filename := tokFile.Name() + src, err := pass.ReadFile(filename) + if err != nil { + return err + } + + hasTrailingComma := false + if len(compLit.Elts) > 0 { + lastElt := compLit.Elts[len(compLit.Elts)-1] + lastEltOffset := tokFile.Offset(lastElt.End()) + rbraceOffset := tokFile.Offset(compLit.Rbrace) + hasTrailingComma = bytes.Contains(src[lastEltOffset:rbraceOffset], []byte(",")) + } + var edits []analysis.TextEdit + // Emit edits to move the field assignment into the struct lit while + // removing it from its current place. + // t := T{...}; t.x = v + // ----- --- - + // t := T{..., x: v} + + // Add a trailing comma before the closing brace of compLit if one doesn't + // exist, and delete the closing brace itself. + // t := T{...}; t.x = v + // - + // t := T{..., t.x = v + if len(compLit.Elts) > 0 && !hasTrailingComma { + edits = append(edits, analysis.TextEdit{ + Pos: compLit.Rbrace, + End: compLit.Rbrace + 1, + NewText: []byte(","), + }) + } else { + edits = append(edits, analysis.TextEdit{ + Pos: compLit.Rbrace, + End: compLit.Rbrace + 1, + }) + } + + // For each assignment: + // t.x = v + // -- --- + // x : v + curStmt = firstStmt + var prevStmt inspector.Cursor + for { + assign := curStmt.Node().(*ast.AssignStmt) + expr := assign.Lhs[0] + sel := expr.(*ast.SelectorExpr) + // Delete "t." + edits = append(edits, analysis.TextEdit{ + Pos: assign.Pos(), + End: sel.Sel.Pos(), + }) + // Replace "=" with ":" + edits = append(edits, analysis.TextEdit{ + Pos: expr.End(), + End: assign.TokPos + 1, + NewText: []byte(":"), + }) + + // Add a comma after the previous assignment if this is not the first one. + if prevStmt.Valid() { + edits = append(edits, analysis.TextEdit{ + Pos: prevStmt.Node().End(), + NewText: []byte(","), }) } + + // For the last assignment, add the closing brace of the struct lit. + if curStmt == lastStmt { + edits = append(edits, analysis.TextEdit{ + Pos: assign.End(), + NewText: []byte("}"), + }) + break + } + prevStmt = curStmt + curStmt, _ = curStmt.NextSibling() // can't fail because we break out of the loop when we hit lastStmt } - return nil, nil + + pass.Report(analysis.Diagnostic{ + Pos: curLit.Node().Pos(), + End: curLit.Node().End(), + Message: "embedded field assignment can be moved to struct literal", + SuggestedFixes: []analysis.SuggestedFix{ + { + Message: "Move embedded field assignment to struct literal", + TextEdits: edits, + }, + }, + }) + return nil } // isEmbeddedFieldLit determines whether elt is a KeyValueExpr "T: T{...}" for @@ -125,7 +403,8 @@ func isEmbeddedFieldLit(info *types.Info, topLevelType types.Type, kv *ast.KeyVa return nil } lit, ok := kv.Value.(*ast.CompositeLit) - if !ok { + if !ok || len(lit.Elts) == 0 { + // Skip if the struct literal is empty. return nil } // We cannot remove this type if any of its nested composite elements have @@ -147,6 +426,7 @@ func isEmbeddedFieldLit(info *types.Info, topLevelType types.Type, kv *ast.KeyVa // type B struct { x int } // _ = T{A: A{x: 1}} // cannot be simplified to T{x: 1} because T has two different embedded fields called "x". + // We also reject composite literals with slice elements, as parentObj will be nil. parentObj, _, _ := types.LookupFieldOrMethod(topLevelType, true, obj.Pkg(), k.Name) if parentObj != obj { return nil diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/errorsastype.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/errorsastype.go index c5d306340..f52f202e2 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/errorsastype.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/errorsastype.go @@ -17,6 +17,7 @@ import ( "golang.org/x/tools/internal/analysis/analyzerutil" typeindexanalyzer "golang.org/x/tools/internal/analysis/typeindex" "golang.org/x/tools/internal/astutil" + "golang.org/x/tools/internal/moreiters" "golang.org/x/tools/internal/refactor" "golang.org/x/tools/internal/typesinternal" "golang.org/x/tools/internal/typesinternal/typeindex" @@ -54,22 +55,15 @@ var ErrorsAsTypeAnalyzer = &analysis.Analyzer{ // // because the transformation in that case would be ungainly. // +// For the negated case (!errors.As), we use !ok instead. +// // Note that the cmd/vet suite includes the "errorsas" analyzer, which // detects actual mistakes in the use of errors.As. This logic does // not belong in errorsas because the problems it fixes are merely // stylistic. // // TODO(adonovan): support more cases: -// -// - Negative cases -// var myerr E -// if !errors.As(err, &myerr) { ... } -// => -// myerr, ok := errors.AsType[E](err) -// if !ok { ... } -// // - if myerr := new(E); errors.As(err, myerr); { ... } -// // - if errors.As(err, myerr) && othercond { ... } func errorsastype(pass *analysis.Pass) (any, error) { var ( @@ -83,7 +77,7 @@ func errorsastype(pass *analysis.Pass) (any, error) { continue // spread call: errors.As(pair()) } - v, curDeclStmt := canUseErrorsAsType(info, index, curCall) + v, curDeclStmt, curIfStmt := canUseErrorsAsType(info, index, curCall) if v == nil { continue } @@ -121,64 +115,82 @@ func errorsastype(pass *analysis.Pass) (any, error) { // Choose a name for the "ok" variable. // We generate a new name only if 'ok' is already declared at // curCall and it also used within the if-statement. - curIf := curCall.Parent() - ifScope := info.Scopes[curIf.Node().(*ast.IfStmt)] - okName := freshName(info, index, ifScope, v.Pos(), curCall, curIf, token.NoPos, "ok") + ifScope := info.Scopes[curIfStmt.Node().(*ast.IfStmt)] + negated := curCall.ParentEdgeKind() == edge.UnaryExpr_X // bool => Tok==NOT + okName := freshName(info, index, ifScope, v.Pos(), curCall, curIfStmt, token.NoPos, "ok") + // Because we reject any use of v outside the if statement, any use besides + // the argument in errors.As must lie inside the if statement. + usesV := moreiters.Len(index.Uses(v)) > 1 + + edits := append( + // delete "var myerr *MyErr" + refactor.DeleteStmt(pass.Fset.File(call.Fun.Pos()), curDeclStmt), + // if errors.As (err, &myerr) { ... } + // ------------- -------------- -------- ---- + // if myerr, ok := errors.AsType[*MyErr](err ); ok { ... } + analysis.TextEdit{ + // Insert "myerr, ok := " if myerr is used inside the if statement. + // Otherwise insert "_, ok := ". + Pos: call.Pos(), + End: call.Pos(), + NewText: fmt.Appendf(nil, "%s, %s := ", cond(usesV, v.Name(), "_"), okName), + }, + analysis.TextEdit{ + // replace As with AsType[T] + Pos: asIdent.Pos(), + End: asIdent.End(), + NewText: fmt.Appendf(nil, "AsType[%s]", errtype), + }, + analysis.TextEdit{ + // delete ", &myerr" + Pos: call.Args[0].End(), + End: call.Args[1].End(), + }, + analysis.TextEdit{ + // insert "; ok" for errors.AsType or "; !ok" for !errors.AsType + Pos: call.End(), + End: call.End(), + NewText: fmt.Appendf(nil, "; %s%s", cond(negated, "!", ""), okName), + }, + ) + if negated { + unaryExpr := curCall.Parent().Node().(*ast.UnaryExpr) + // delete "!" + edits = append(edits, analysis.TextEdit{ + Pos: unaryExpr.OpPos, + End: unaryExpr.X.Pos(), + }) + } pass.Report(analysis.Diagnostic{ Pos: call.Fun.Pos(), End: call.Fun.End(), Message: fmt.Sprintf("errors.As can be simplified using AsType[%s]", errtype), SuggestedFixes: []analysis.SuggestedFix{{ - Message: fmt.Sprintf("Replace errors.As with AsType[%s]", errtype), - TextEdits: append( - // delete "var myerr *MyErr" - refactor.DeleteStmt(pass.Fset.File(call.Fun.Pos()), curDeclStmt), - // if errors.As (err, &myerr) { ... } - // ------------- -------------- -------- ---- - // if myerr, ok := errors.AsType[*MyErr](err ); ok { ... } - analysis.TextEdit{ - // insert "myerr, ok := " - Pos: call.Pos(), - End: call.Pos(), - NewText: fmt.Appendf(nil, "%s, %s := ", v.Name(), okName), - }, - analysis.TextEdit{ - // replace As with AsType[T] - Pos: asIdent.Pos(), - End: asIdent.End(), - NewText: fmt.Appendf(nil, "AsType[%s]", errtype), - }, - analysis.TextEdit{ - // delete ", &myerr" - Pos: call.Args[0].End(), - End: call.Args[1].End(), - }, - analysis.TextEdit{ - // insert "; ok" - Pos: call.End(), - End: call.End(), - NewText: fmt.Appendf(nil, "; %s", okName), - }, - ), + Message: fmt.Sprintf("Replace errors.As with AsType[%s]", errtype), + TextEdits: edits, }}, }) } return nil, nil } -// canUseErrorsAsType reports whether curCall is a call to -// errors.As beneath an if statement, preceded by a -// declaration of the typed error var. The var must not be -// used outside the if statement. -func canUseErrorsAsType(info *types.Info, index *typeindex.Index, curCall inspector.Cursor) (_ *types.Var, _ inspector.Cursor) { - if curCall.ParentEdgeKind() != edge.IfStmt_Cond { - return // not beneath if statement +// canUseErrorsAsType reports whether curCall is a call to errors.As beneath an +// if statement, preceded by a declaration of the typed error var. The var must +// not be used outside the if statement. +// If the conditions are met, it returns the error var, the cursor for its +// DeclStmt, and the cursor for the IfStmt that contains the call to errors.As. +// Otherwise it returns a nil error var. +func canUseErrorsAsType(info *types.Info, index *typeindex.Index, curCall inspector.Cursor) (_ *types.Var, curDeclStmt, curIfStmt inspector.Cursor) { + curCond := curCall + if curCond.ParentEdgeKind() == edge.UnaryExpr_X { // if !errors.As(err, &v) + curCond = curCond.Parent() } - var ( - curIfStmt = curCall.Parent() - ifStmt = curIfStmt.Node().(*ast.IfStmt) - ) + if curCond.ParentEdgeKind() != edge.IfStmt_Cond { + return // not beneath if or unaryexpr + } + curIfStmt = curCond.Parent() + ifStmt := curIfStmt.Node().(*ast.IfStmt) if ifStmt.Init != nil { return // if statement already has an init part } @@ -222,5 +234,5 @@ func canUseErrorsAsType(info *types.Info, index *typeindex.Index, curCall inspec // ... // if errors.As(err, &v) { ... } // with no uses of v outside the IfStmt. - return v, curDecl.Parent() // DeclStmt + return v, curDecl.Parent(), curIfStmt // curDecl.Parent() is a DeclStmt } diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go index 80491273b..104687693 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go @@ -35,11 +35,8 @@ var doc string var Suite = []*analysis.Analyzer{ AnyAnalyzer, AtomicTypesAnalyzer, - // AppendClippedAnalyzer, // not nil-preserving! - // BLoopAnalyzer, // may skew benchmark results, see golang/go#74967 EmbedLitAnalyzer, ErrorsAsTypeAnalyzer, - // FmtAppendfAnalyzer, // makes code less clear, see golang/go#77581 ForVarAnalyzer, MapsLoopAnalyzer, MinMaxAnalyzer, @@ -48,9 +45,8 @@ var Suite = []*analysis.Analyzer{ PlusBuildAnalyzer, RangeIntAnalyzer, ReflectTypeForAnalyzer, - slicesBackwardAnalyzer, + slicesBackwardAnalyzer, // awaiting public symbol SlicesContainsAnalyzer, - // SlicesDeleteAnalyzer, // not nil-preserving! SlicesSortAnalyzer, StdIteratorsAnalyzer, StringsCutAnalyzer, @@ -58,8 +54,15 @@ var Suite = []*analysis.Analyzer{ StringsSeqAnalyzer, StringsBuilderAnalyzer, TestingContextAnalyzer, - unsafeFuncsAnalyzer, + unsafeFuncsAnalyzer, // awaiting public symbol WaitGroupGoAnalyzer, + + // Not included: + // + // AppendClippedAnalyzer, // not nil-preserving + // BLoopAnalyzer, // may skew benchmark results, see golang/go#74967 + // FmtAppendfAnalyzer, // makes code less clear, see golang/go#77581 + // SlicesDeleteAnalyzer, // not nil-preserving } // -- helpers -- diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/slicesbackward.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/slicesbackward.go index 305b5e5b1..02cd30a25 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/slicesbackward.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/slicesbackward.go @@ -18,12 +18,12 @@ import ( "golang.org/x/tools/internal/analysis/analyzerutil" typeindexanalyzer "golang.org/x/tools/internal/analysis/typeindex" "golang.org/x/tools/internal/astutil" - "golang.org/x/tools/internal/goplsexport" "golang.org/x/tools/internal/refactor" "golang.org/x/tools/internal/typesinternal/typeindex" "golang.org/x/tools/internal/versions" ) +// TODO(adonovan): needs a proposal for a public symbol. var slicesBackwardAnalyzer = &analysis.Analyzer{ Name: "slicesbackward", Doc: analyzerutil.MustExtractDoc(doc, "slicesbackward"), @@ -35,11 +35,6 @@ var slicesBackwardAnalyzer = &analysis.Analyzer{ URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize#slicesbackward", } -func init() { - // Export to gopls until this is a published modernizer. - goplsexport.SlicesBackwardModernizer = slicesBackwardAnalyzer -} - // slicesbackward offers a fix to replace a manually-written backward loop: // // for i := len(s) - 1; i >= 0; i-- { diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/slicescontains.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/slicescontains.go index c1d42188f..ed75e05e9 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/slicescontains.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/slicescontains.go @@ -19,6 +19,7 @@ import ( "golang.org/x/tools/internal/astutil" "golang.org/x/tools/internal/refactor" "golang.org/x/tools/internal/typeparams" + "golang.org/x/tools/internal/typesinternal" "golang.org/x/tools/internal/typesinternal/typeindex" "golang.org/x/tools/internal/versions" ) @@ -58,12 +59,8 @@ var SlicesContainsAnalyzer = &analysis.Analyzer{ // statement is "found = false" (or vice versa), the // loop becomes "found = [!]slices.Contains(...)". // -// It may change cardinality of effects of the "needle" expression. -// (Mostly this appears to be a desirable optimization, avoiding -// redundantly repeated evaluation.) -// -// TODO(adonovan): Add a check that needle/predicate expression from -// if-statement has no effects. Now the program behavior may change. +// It rejects candidates whose needle/predicate expression from the if-statement +// has side effects to avoid changes in program behavior. func slicescontains(pass *analysis.Pass) (any, error) { // Skip the analyzer in packages where its // fixes would create an import cycle. @@ -174,6 +171,11 @@ func slicescontains(pass *analysis.Pass) (any, error) { return } + // Reject if needle/predicate expression has side effects. + if !typesinternal.NoEffects(info, arg2) { + return + } + // Reject if the body, needle or predicate references either range variable. usesRangeVar := func(n ast.Node) bool { cur, ok := curRange.FindNode(n) diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscutprefix.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscutprefix.go index ae6345400..11d335909 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscutprefix.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscutprefix.go @@ -16,6 +16,7 @@ import ( "golang.org/x/tools/internal/analysis/analyzerutil" typeindexanalyzer "golang.org/x/tools/internal/analysis/typeindex" "golang.org/x/tools/internal/astutil" + "golang.org/x/tools/internal/moreiters" "golang.org/x/tools/internal/refactor" "golang.org/x/tools/internal/typesinternal" "golang.org/x/tools/internal/typesinternal/typeindex" @@ -217,34 +218,47 @@ func stringscutprefix(pass *analysis.Pass) (any, error) { call.Pos(), ) + // if x := strings.TrimPrefix(s, pre); x != s ... + // ---- ---------- ------ + // if x, ok := strings.CutPrefix (s, pre); ok ... + // (ditto Suffix) + edits := append(importEdits, []analysis.TextEdit{ + { + Pos: assign.Lhs[0].End(), + End: assign.Lhs[0].End(), + NewText: fmt.Appendf(nil, ", %s", okVarName), + }, + { + Pos: call.Fun.Pos(), + End: call.Fun.End(), + NewText: fmt.Appendf(nil, "%s%s", prefix, cutFuncName), + }, + { + Pos: ifStmt.Cond.Pos(), + End: ifStmt.Cond.End(), + NewText: []byte(okVarName), + }, + }...) + + // Replace the "after" variable with "_" if is unused inside the if statement. + if id, ok := lhs.(*ast.Ident); ok { + if obj := info.ObjectOf(id); obj != nil && moreiters.Len(index.Uses(obj)) < 2 { + edits = append(edits, analysis.TextEdit{ + Pos: assign.Lhs[0].Pos(), + End: assign.Lhs[0].End(), + NewText: []byte("_"), + }) + } + } + pass.Report(analysis.Diagnostic{ // highlight from the init and the condition end. Pos: ifStmt.Init.Pos(), End: ifStmt.Cond.End(), Message: message, SuggestedFixes: []analysis.SuggestedFix{{ - Message: fixMessage, - // if x := strings.TrimPrefix(s, pre); x != s ... - // ---- ---------- ------ - // if x, ok := strings.CutPrefix (s, pre); ok ... - // (ditto Suffix) - TextEdits: append(importEdits, []analysis.TextEdit{ - { - Pos: assign.Lhs[0].End(), - End: assign.Lhs[0].End(), - NewText: fmt.Appendf(nil, ", %s", okVarName), - }, - { - Pos: call.Fun.Pos(), - End: call.Fun.End(), - NewText: fmt.Appendf(nil, "%s%s", prefix, cutFuncName), - }, - { - Pos: ifStmt.Cond.Pos(), - End: ifStmt.Cond.End(), - NewText: []byte(okVarName), - }, - }...), + Message: fixMessage, + TextEdits: edits, }}, }) } diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/unsafefuncs.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/unsafefuncs.go index 91c2f378e..34c135ca6 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/unsafefuncs.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/unsafefuncs.go @@ -16,7 +16,6 @@ import ( "golang.org/x/tools/go/ast/inspector" "golang.org/x/tools/internal/analysis/analyzerutil" "golang.org/x/tools/internal/astutil" - "golang.org/x/tools/internal/goplsexport" "golang.org/x/tools/internal/refactor" "golang.org/x/tools/internal/typesinternal" "golang.org/x/tools/internal/versions" @@ -29,6 +28,7 @@ import ( // func Slice(ptr *ArbitraryType, len IntegerType) []ArbitraryType // func SliceData(slice []ArbitraryType) *ArbitraryType +// TODO(adonovan): needs a proposal for a public symbol. var unsafeFuncsAnalyzer = &analysis.Analyzer{ Name: "unsafefuncs", Doc: analyzerutil.MustExtractDoc(doc, "unsafefuncs"), @@ -37,11 +37,6 @@ var unsafeFuncsAnalyzer = &analysis.Analyzer{ URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize#unsafefuncs", } -func init() { - // Export to gopls until this is a published modernizer. - goplsexport.UnsafeFuncsModernizer = unsafeFuncsAnalyzer -} - func unsafefuncs(pass *analysis.Pass) (any, error) { // Short circuit if the package doesn't use unsafe. // (In theory one could use some imported alias of unsafe.Pointer, diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go index 130653127..f82d2eaea 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go @@ -416,7 +416,7 @@ func match(info *types.Info, arg ast.Expr, param *types.Var) bool { } // propagate propagates changes in wrapper (non-None) kind information backwards -// through through the wrapper.callers graph of well-formed forwarding calls. +// through the wrapper.callers graph of well-formed forwarding calls. func propagate(pass *analysis.Pass, w *wrapper, call *ast.CallExpr, kind Kind, res *Result) { // Check correct call forwarding. // @@ -1061,7 +1061,10 @@ func recursiveStringer(pass *analysis.Pass, e ast.Expr) (string, bool) { e = u.X // strip off & from &r } if id, ok := e.(*ast.Ident); ok { - if pass.TypesInfo.Uses[id] == sig.Recv() { + // Uses refers to the receiver Var for the declared method, but looking up the String + // method on the instantiated receiver type may return an instantiated Signature with + // distinct parameter variables. Therefore we must compare against the Origin. + if pass.TypesInfo.Uses[id] == sig.Recv().Origin() { return method.FullName(), true } } diff --git a/tools/vendor/golang.org/x/tools/go/callgraph/util.go b/tools/vendor/golang.org/x/tools/go/callgraph/util.go index 549932047..d8562a98e 100644 --- a/tools/vendor/golang.org/x/tools/go/callgraph/util.go +++ b/tools/vendor/golang.org/x/tools/go/callgraph/util.go @@ -101,6 +101,7 @@ func (g *Graph) DeleteSyntheticNodes() { edges[*e] = true } } + // Note: these cross-products can exceed 100 x 100. for fn, cgn := range g.Nodes { if cgn == g.Root || isInit(cgn.Func) || fn.Syntax() != nil { continue // keep diff --git a/tools/vendor/golang.org/x/tools/go/packages/packages.go b/tools/vendor/golang.org/x/tools/go/packages/packages.go index de683684a..1e5549abe 100644 --- a/tools/vendor/golang.org/x/tools/go/packages/packages.go +++ b/tools/vendor/golang.org/x/tools/go/packages/packages.go @@ -815,6 +815,12 @@ func (ld *loader) refine(response *DriverResponse) ([]*Package, error) { needsrc: needsrc, goVersion: response.GoVersion, } + // Don't trust the driver to respond with duplicate-free + // package names (go.dev/issue/63822). + if _, ok := ld.pkgs[lpkg.ID]; ok { + return nil, fmt.Errorf("%s response contained duplicate packages for ID %q", + cond(ld.externalDriver, "go/packages driver", "go list"), lpkg.ID) + } ld.pkgs[lpkg.ID] = lpkg if rootIndex >= 0 { initial[rootIndex] = lpkg @@ -1589,3 +1595,11 @@ func usesExportData(cfg *Config) bool { } type unit struct{} + +func cond[T any](cond bool, t, f T) T { + if cond { + return t + } else { + return f + } +} diff --git a/tools/vendor/golang.org/x/tools/go/ssa/builder.go b/tools/vendor/golang.org/x/tools/go/ssa/builder.go index 242074925..0e47d2d01 100644 --- a/tools/vendor/golang.org/x/tools/go/ssa/builder.go +++ b/tools/vendor/golang.org/x/tools/go/ssa/builder.go @@ -825,8 +825,8 @@ func (b *builder) expr0(fn *Function, e ast.Expr, tv types.TypeAndValue) Value { } callee := v.(*Function) // (func) if callee.typeparams.Len() > 0 { - targs := fn.subst.types(instanceArgs(fn.info, e)) - callee = callee.instance(targs, b) + targs := fn.subtargs(e) + callee = callee.instance(nil, targs, b) } return callee } @@ -847,15 +847,16 @@ func (b *builder) expr0(fn *Function, e ast.Expr, tv types.TypeAndValue) Value { case types.MethodExpr: // (*T).f or T.f, the method f from the method-set of type T. // The result is a "thunk". - thunk := createThunk(fn.Prog, sel) + targs := fn.subtargs(e.Sel) + thunk := createThunk(fn.Prog, sel, targs) b.enqueue(thunk) - return emitConv(fn, thunk, fn.typ(tv.Type)) + return thunk case types.MethodVal: // e.f where e is an expression and f is a method. // The result is a "bound". - obj := sel.obj.(*types.Func) - rt := fn.typ(recvType(obj)) + m := sel.obj.(*types.Func) + rt := fn.typ(recvType(m)) wantAddr := isPointer(rt) escaping := true v := b.receiver(fn, e.X, wantAddr, escaping, sel) @@ -886,11 +887,13 @@ func (b *builder) expr0(fn *Function, e ast.Expr, tv types.TypeAndValue) Value { emitTypeAssert(fn, v, rt, e.Sel.Pos()) } } - if targs := receiverTypeArgs(obj); len(targs) > 0 { - // obj is generic. - obj = fn.Prog.canon.instantiateMethod(obj, fn.subst.types(targs), fn.Prog.ctxt) + + if rtargs := fn.subrtargs(m); len(rtargs) > 0 { + m = fn.Prog.canon.instantiateMethod(m, rtargs, fn.Prog.ctxt) } - bound := createBound(fn.Prog, obj) + + targs := fn.subtargs(e.Sel) + bound := createBound(fn.Prog, m, targs) b.enqueue(bound) // The assignment may widen a type parameter to its @@ -902,7 +905,7 @@ func (b *builder) expr0(fn *Function, e ast.Expr, tv types.TypeAndValue) Value { Bindings: []Value{v}, } c.setPos(e.Sel.Pos()) - c.setType(fn.typ(tv.Type)) + c.setType(bound.Signature) return fn.emit(c) case types.FieldVal: @@ -1015,8 +1018,15 @@ func (b *builder) receiver(fn *Function, e ast.Expr, wantAddr, escaping bool, se func (b *builder) setCallFunc(fn *Function, e *ast.CallExpr, c *CallCommon) { c.pos = e.Lparen - // Is this a method call? - if selector, ok := ast.Unparen(e.Fun).(*ast.SelectorExpr); ok { + // Is this a (possibly generic) method call? + m := ast.Unparen(e.Fun) + switch e := m.(type) { + case *ast.IndexExpr: + m = e.X + case *ast.IndexListExpr: + m = e.X + } + if selector, ok := m.(*ast.SelectorExpr); ok { sel := fn.selection(selector) if sel != nil && sel.kind == types.MethodVal { obj := sel.obj.(*types.Func) @@ -1031,7 +1041,8 @@ func (b *builder) setCallFunc(fn *Function, e *ast.CallExpr, c *CallCommon) { c.Method = obj } else { // "Call"-mode call. - c.Value = fn.Prog.objectMethod(obj, b) + targs := fn.subtargs(selector.Sel) + c.Value = fn.Prog.objectMethod(obj, targs, b) c.Args = append(c.Args, v) } return diff --git a/tools/vendor/golang.org/x/tools/go/ssa/create.go b/tools/vendor/golang.org/x/tools/go/ssa/create.go index d94cb6fb7..3d20e555f 100644 --- a/tools/vendor/golang.org/x/tools/go/ssa/create.go +++ b/tools/vendor/golang.org/x/tools/go/ssa/create.go @@ -115,33 +115,26 @@ func memberFromObject(pkg *Package, obj types.Object, syntax ast.Node, goversion func createFunction(prog *Program, obj *types.Func, name string, syntax ast.Node, info *types.Info, goversion string) *Function { sig := obj.Type().(*types.Signature) - // Collect type parameters. - var tparams *types.TypeParamList - if rtparams := sig.RecvTypeParams(); rtparams.Len() > 0 { - tparams = rtparams // method of generic type - } else if sigparams := sig.TypeParams(); sigparams.Len() > 0 { - tparams = sigparams // generic function - } - /* declared function/method (from syntax or export data) */ fn := &Function{ - name: name, - object: obj, - Signature: sig, - build: (*builder).buildFromSyntax, - syntax: syntax, - info: info, - goversion: goversion, - pos: obj.Pos(), - Pkg: nil, // may be set by caller - Prog: prog, - typeparams: tparams, + name: name, + object: obj, + Signature: sig, + build: (*builder).buildFromSyntax, + syntax: syntax, + info: info, + goversion: goversion, + pos: obj.Pos(), + Pkg: nil, // may be set by caller + Prog: prog, + recvtypeparams: sig.RecvTypeParams(), + typeparams: sig.TypeParams(), } if fn.syntax == nil { fn.Synthetic = "from type information" fn.build = (*builder).buildParamsOnly } - if tparams.Len() > 0 { + if fn.hasTypeParams() { fn.generic = new(generic) } return fn diff --git a/tools/vendor/golang.org/x/tools/go/ssa/emit.go b/tools/vendor/golang.org/x/tools/go/ssa/emit.go index 31aa5de8d..c38f1fbf6 100644 --- a/tools/vendor/golang.org/x/tools/go/ssa/emit.go +++ b/tools/vendor/golang.org/x/tools/go/ssa/emit.go @@ -248,7 +248,7 @@ func emitConv(f *Function, val Value, typ types.Type) Value { // Record the types of operands to MakeInterface, if // non-parameterized, as they are the set of runtime types. t := val.Type() - if f.typeparams.Len() == 0 || !f.Prog.isParameterized(t) { + if !f.hasTypeParams() || !f.Prog.isParameterized(t) { addMakeInterfaceType(f.Prog, t) } diff --git a/tools/vendor/golang.org/x/tools/go/ssa/instantiate.go b/tools/vendor/golang.org/x/tools/go/ssa/instantiate.go index 5862440a6..4eb53aa2c 100644 --- a/tools/vendor/golang.org/x/tools/go/ssa/instantiate.go +++ b/tools/vendor/golang.org/x/tools/go/ssa/instantiate.go @@ -19,13 +19,13 @@ type generic struct { } // instance returns a Function that is the instantiation of generic -// origin function fn with the type arguments targs. +// origin function fn with the type arguments rtargs and targs. // // Any created instance is added to cr. // // Acquires fn.generic.instancesMu. -func (fn *Function) instance(targs []types.Type, b *builder) *Function { - key := fn.Prog.canon.List(targs) +func (fn *Function) instance(rtargs, targs []types.Type, b *builder) *Function { + key := fn.Prog.canon.List(slices.Concat(rtargs, targs)) gen := fn.generic @@ -33,7 +33,7 @@ func (fn *Function) instance(targs []types.Type, b *builder) *Function { defer gen.instancesMu.Unlock() inst, ok := gen.instances[key] if !ok { - inst = createInstance(fn, targs) + inst = createInstance(fn, rtargs, targs) inst.buildshared = b.shared() b.enqueue(inst) @@ -48,20 +48,46 @@ func (fn *Function) instance(targs []types.Type, b *builder) *Function { } // createInstance returns the instantiation of generic function fn using targs. +// If fn is a method on a generic type, fn's receiver type will be instantiated +// using rtargs. // // Requires fn.generic.instancesMu. -func createInstance(fn *Function, targs []types.Type) *Function { +func createInstance(fn *Function, rtargs, targs []types.Type) *Function { prog := fn.Prog // Compute signature. var sig *types.Signature var obj *types.Func if recv := fn.Signature.Recv(); recv != nil { - // method - obj = prog.canon.instantiateMethod(fn.object, targs, prog.ctxt) - sig = obj.Type().(*types.Signature) + // method, len(rtargs) > 0 || len(targs) > 0 + if len(rtargs) > 0 { + // possibly generic method on generic type + obj = prog.canon.instantiateMethod(fn.object, rtargs, prog.ctxt) + } else { + // generic method on non-generic type + obj = fn.object // instantiation does not exist yet + } + if len(targs) > 0 { + // generic method + instSig, err := types.Instantiate(prog.ctxt, obj.Signature(), targs, false) + if err != nil { + panic(err) + } + instance, ok := instSig.(*types.Signature) + if !ok { + panic("Instantiate of a Signature returned a non-signature") + } + // Do not canonicalize generic methods, because the receiver is not + // part of a Signature's type identity. For example, + // (*G[int]).m[int] and (G[int]).n[int] may be identical types even + // though their receiver types differ. + sig = instance + } else { + // non-generic method on generic type + sig = obj.Signature() + } } else { - // function + // function, len(rtargs) == 0 && len(targs) > 0 instSig, err := types.Instantiate(prog.ctxt, fn.Signature, targs, false) if err != nil { panic(err) @@ -80,10 +106,10 @@ func createInstance(fn *Function, targs []types.Type) *Function { subst *subster build buildFunc ) - if prog.mode&InstantiateGenerics != 0 && !prog.isParameterized(targs...) { + if prog.mode&InstantiateGenerics != 0 && !prog.isParameterized(slices.Concat(rtargs, targs)...) { synthetic = fmt.Sprintf("instance of %s", fn.Name()) if fn.syntax != nil { - subst = makeSubster(prog.ctxt, obj, fn.typeparams, targs) + subst = makeSubster(prog.ctxt, obj, fn.recvtypeparams, rtargs, fn.typeparams, targs) build = (*builder).buildFromSyntax } else { build = (*builder).buildParamsOnly @@ -93,9 +119,14 @@ func createInstance(fn *Function, targs []types.Type) *Function { build = (*builder).buildInstantiationWrapper } + name := fn.Name() + if len(targs) > 0 { + name = fmt.Sprintf("%s%s", name, targstr(targs)) // may not be unique + } + /* generic instance or instantiation wrapper */ return &Function{ - name: fmt.Sprintf("%s%s", fn.Name(), targs), // may not be unique + name: name, object: obj, Signature: sig, Synthetic: synthetic, @@ -107,6 +138,8 @@ func createInstance(fn *Function, targs []types.Type) *Function { pos: obj.Pos(), Pkg: nil, Prog: fn.Prog, + recvtypeparams: fn.recvtypeparams, // share with origin + recvtypeargs: rtargs, typeparams: fn.typeparams, // share with origin typeargs: targs, subst: subst, diff --git a/tools/vendor/golang.org/x/tools/go/ssa/methods.go b/tools/vendor/golang.org/x/tools/go/ssa/methods.go index 4b116f430..82faadeb6 100644 --- a/tools/vendor/golang.org/x/tools/go/ssa/methods.go +++ b/tools/vendor/golang.org/x/tools/go/ssa/methods.go @@ -32,8 +32,8 @@ func (prog *Program) MethodValue(sel *types.Selection) *Function { return nil // interface method or type parameter } - if prog.isParameterized(T) { - return nil // generic method + if prog.isParameterized(T, sel.Type()) { + return nil // method on generic type or generic method } if prog.mode&LogSource != 0 { @@ -61,11 +61,11 @@ func (prog *Program) MethodValue(sel *types.Selection) *Function { needsPromotion := len(sel.Index()) > 1 needsIndirection := !isPointer(recvType(obj)) && isPointer(T) if needsPromotion || needsIndirection { - fn = createWrapper(prog, toSelection(sel)) + fn = createWrapper(prog, toSelection(sel), nil) fn.buildshared = b.shared() b.enqueue(fn) } else { - fn = prog.objectMethod(obj, &b) + fn = prog.objectMethod(obj, nil, &b) } if fn.Signature.Recv() == nil { panic(fn) @@ -91,25 +91,22 @@ func (prog *Program) MethodValue(sel *types.Selection) *Function { // objectMethod panics if the function is not a method. // // Acquires prog.objectMethodsMu. -func (prog *Program) objectMethod(obj *types.Func, b *builder) *Function { +func (prog *Program) objectMethod(obj *types.Func, targs []types.Type, b *builder) *Function { sig := obj.Type().(*types.Signature) if sig.Recv() == nil { panic("not a method: " + obj.String()) } + // Instantiation of generic? + if orig := obj.Origin(); orig != obj || len(targs) > 0 { + return prog.objectMethod(orig, nil, b).instance(receiverTypeArgs(obj), targs, b) + } + // Belongs to a created package? if fn := prog.FuncValue(obj); fn != nil { return fn } - // Instantiation of generic? - if originObj := obj.Origin(); originObj != obj { - origin := prog.objectMethod(originObj, b) - assert(origin.typeparams.Len() > 0, "origin is not generic") - targs := receiverTypeArgs(obj) - return origin.instance(targs, b) - } - // Consult/update cache of methods created from types.Func. prog.objectMethodsMu.Lock() defer prog.objectMethodsMu.Unlock() diff --git a/tools/vendor/golang.org/x/tools/go/ssa/sanity.go b/tools/vendor/golang.org/x/tools/go/ssa/sanity.go index 5bd5d97df..824252d64 100644 --- a/tools/vendor/golang.org/x/tools/go/ssa/sanity.go +++ b/tools/vendor/golang.org/x/tools/go/ssa/sanity.go @@ -454,7 +454,7 @@ func (s *sanity) checkFunctionParams() { } if !types.Identical(sigType, param.Type()) { - s.errorf("expect type %s in signature but got type %s in param %d", param.Type(), sigType, i) + s.errorf("expect type %s in signature but got type %s in param %d", sigType, param.Type(), i) } } } @@ -529,16 +529,16 @@ func (s *sanity) checkFunction(fn *Function) bool { strings.HasSuffix(fn.name, "Error") || strings.HasPrefix(fn.Synthetic, "instance ") || strings.HasPrefix(fn.Synthetic, "instantiation ") || - (fn.parent != nil && len(fn.typeargs) > 0) /* anon fun in instance */ { + fn.parent != nil && fn.parent.hasTypeArgs() /* anon fun in instance */ { // ok } else { s.errorf("nil Pkg") } } if src, syn := fn.Synthetic == "", fn.Syntax() != nil; src != syn { - if len(fn.typeargs) > 0 && fn.Prog.mode&InstantiateGenerics != 0 { + if fn.hasTypeArgs() && fn.Prog.mode&InstantiateGenerics != 0 { // ok (instantiation with InstantiateGenerics on) - } else if fn.topLevelOrigin != nil && len(fn.typeargs) > 0 { + } else if fn.hasTypeArgs() && fn.topLevelOrigin != nil { // ok (we always have the syntax set for instantiation) } else if _, rng := fn.syntax.(*ast.RangeStmt); rng && fn.Synthetic == "range-over-func yield" { // ok (range-func-yields are both synthetic and keep syntax) diff --git a/tools/vendor/golang.org/x/tools/go/ssa/ssa.go b/tools/vendor/golang.org/x/tools/go/ssa/ssa.go index 7c84494c3..514ba2ba1 100644 --- a/tools/vendor/golang.org/x/tools/go/ssa/ssa.go +++ b/tools/vendor/golang.org/x/tools/go/ssa/ssa.go @@ -13,7 +13,11 @@ import ( "go/constant" "go/token" "go/types" + "reflect" + "slices" + "strings" "sync" + "unsafe" "golang.org/x/tools/go/types/typeutil" "golang.org/x/tools/internal/typeparams" @@ -364,8 +368,10 @@ type Function struct { referrers []Instruction // referring instructions (iff Parent() != nil) anonIdx int32 // position of a nested function in parent's AnonFuncs. fn.Parent()!=nil => fn.Parent().AnonFunc[fn.anonIdx] == fn. - typeparams *types.TypeParamList // type parameters of this function. typeparams.Len() > 0 => generic or instance of generic function - typeargs []types.Type // type arguments that instantiated typeparams. len(typeargs) > 0 => instance of generic function + recvtypeparams *types.TypeParamList // receiver type parameters of this function. recvtypeparams.Len() > 0 => method on generic or instance of generic type + recvtypeargs []types.Type // type arguments that instantiated recvtypeparams. len(recvtypeargs) > 0 => method on instance of generic type + typeparams *types.TypeParamList // type parameters of this function. typeparams.Len() > 0 => generic or instance of generic function or method + typeargs []types.Type // type arguments that instantiated typeparams. len(typeargs) > 0 => instance of generic function or method topLevelOrigin *Function // the origin function if this is an instance of a source function. nil if Parent()!=nil. generic *generic // instances of this function, if generic @@ -1577,18 +1583,73 @@ func (v *Function) Referrers() *[]Instruction { // TypeParams are the function's type parameters if generic or the // type parameters that were instantiated if fn is an instantiation. +// +// Specifically, the resulting list behaves like: +// +// func f // [] +// func f[P] // [P] +// func (T) m // [] +// func (T) m[P] // [P] +// func (T[P]) m // [P] +// func (T[P]) m[Q] // [P (index=0), Q (index=0)] +// +// Note that receiver type parameters precede other type parameters. +// Also, type parameters may have the same index if they come from +// different source type parameter lists. func (fn *Function) TypeParams() *types.TypeParamList { - return fn.typeparams + return consTypeParamLists(fn.recvtypeparams, fn.typeparams) +} + +func consTypeParamLists(l, r *types.TypeParamList) *types.TypeParamList { + if l.Len() == 0 { + return r + } + if r.Len() == 0 { + return l + } + + tpars := make([]*types.TypeParam, l.Len()+r.Len()) + for i := range l.Len() { + tpars[i] = l.At(i) + } + for i := range r.Len() { + tpars[i+l.Len()] = r.At(i) + } + // This logic unsafely assumes (and asserts) that the layout of the + // TypeParamList is identical to that of a slice of TypeParams. This + // is a hack while we work on getting a constructor for TypeParamList + // approved (see go.dev/issue/79603). + t := reflect.TypeFor[types.TypeParamList]() + if t.NumField() != 1 { + panic("TypeParamList has unexpected fields") + } + if f := t.Field(0); f.Offset != 0 || f.Type != reflect.TypeFor[[]*types.TypeParam]() { + panic("TypeParamList field is not []*TypeParam") + } + return (*types.TypeParamList)(unsafe.Pointer(&tpars)) } // TypeArgs are the types that TypeParams() were instantiated by to create fn // from fn.Origin(). -func (fn *Function) TypeArgs() []types.Type { return fn.typeargs } +// +// Specifically, the resulting slice behaves like: +// +// f // [] +// f[int] // [int] +// T.m // [] +// T.m[int] // [int] +// T[int].m // [int] +// T[int].m[uint] // [int, uint] +// +// Note that receiver type arguments precede other type arguments. +func (fn *Function) TypeArgs() []types.Type { + return slices.Concat(fn.recvtypeargs, fn.typeargs) +} // Origin returns the generic function from which fn was instantiated, // or nil if fn is not an instantiation. func (fn *Function) Origin() *Function { - if fn.parent != nil && len(fn.typeargs) > 0 { + if fn.parent != nil && fn.parent.hasTypeArgs() { // Nested functions are BUILT at a different time than their instances. // Build declared package if not yet BUILT. This is not an expected use // case, but is simple and robust. @@ -1597,12 +1658,48 @@ func (fn *Function) Origin() *Function { return origin(fn) } +// hasTypeParams returns whether fn has any type parameters +func (fn *Function) hasTypeParams() bool { + return fn.recvtypeparams.Len()+fn.typeparams.Len() > 0 +} + +// hasTypeArgs returns whether fn has any type arguments +func (fn *Function) hasTypeArgs() bool { + return len(fn.recvtypeargs)+len(fn.typeargs) > 0 +} + +// subrtargs returns fn's receiver type parameters substituted with receiver type arguments +func (fn *Function) subrtargs(m *types.Func) []types.Type { + return fn.subst.types(receiverTypeArgs(m)) +} + +// subtargs returns fn's type parameters substituted with (possibly implied) type arguments +func (fn *Function) subtargs(id *ast.Ident) []types.Type { + return fn.subst.types(instanceArgs(fn.info, id)) +} + +// targstr returns a comma-separated string of the types in targs +func targstr(targs []types.Type) string { + var sb strings.Builder + if len(targs) > 0 { + sb.WriteString("[") + for i := range targs { + if i > 0 { + sb.WriteString(", ") + } + sb.WriteString(targs[i].String()) + } + sb.WriteString("]") + } + return sb.String() +} + // origin is the function that fn is an instantiation of. Returns nil if fn is // not an instantiation. // // Precondition: fn and the origin function are done building. func origin(fn *Function) *Function { - if fn.parent != nil && len(fn.typeargs) > 0 { + if fn.parent != nil && fn.parent.hasTypeArgs() { return origin(fn.parent).AnonFuncs[fn.anonIdx] } return fn.topLevelOrigin diff --git a/tools/vendor/golang.org/x/tools/go/ssa/ssautil/visit.go b/tools/vendor/golang.org/x/tools/go/ssa/ssautil/visit.go index 7300d2bf3..3cfc2bac0 100644 --- a/tools/vendor/golang.org/x/tools/go/ssa/ssautil/visit.go +++ b/tools/vendor/golang.org/x/tools/go/ssa/ssautil/visit.go @@ -74,8 +74,11 @@ func AllFunctions(prog *ssa.Program) map[*ssa.Function]bool { methodsOf := func(T types.Type) { if !types.IsInterface(T) { mset := prog.MethodSets.MethodSet(T) - for method := range mset.Methods() { - function(prog.MethodValue(method)) + for sel := range mset.Methods() { + // Skip generic methods. + if sel.Obj().(*types.Func).Signature().TypeParams() == nil { + function(prog.MethodValue(sel)) + } } } } @@ -104,6 +107,7 @@ func AllFunctions(prog *ssa.Program) map[*ssa.Function]bool { // Consider only named types. // (Ignore aliases and unsafe.Pointer.) if named, ok := t.Type().(*types.Named); ok { + // Skip generic types. if named.TypeParams() == nil { methodsOf(named) // T methodsOf(types.NewPointer(named)) // *T @@ -117,6 +121,11 @@ func AllFunctions(prog *ssa.Program) map[*ssa.Function]bool { switch mem := mem.(type) { case *ssa.Function: // Visit all package-level declared functions. + // + // (This may include generic functions, which is + // inconsistent with the treatment of methods: + // we skip both generic methods, + // and methods of generic types.) function(mem) case *ssa.Type: diff --git a/tools/vendor/golang.org/x/tools/go/ssa/subst.go b/tools/vendor/golang.org/x/tools/go/ssa/subst.go index a5441690f..00b56ef08 100644 --- a/tools/vendor/golang.org/x/tools/go/ssa/subst.go +++ b/tools/vendor/golang.org/x/tools/go/ssa/subst.go @@ -5,6 +5,7 @@ package ssa import ( + "fmt" "go/types" "golang.org/x/tools/go/types/typeutil" @@ -56,18 +57,25 @@ type subster struct { // TODO(taking): consider adding Pos } -// Returns a subster that replaces tparams[i] with targs[i]. Uses ctxt as a cache. -// targs should not contain any types in tparams. +// Returns a subster that replaces rtparams[i] with rtargs[i] and tparams[i] with targs[i]. +// Uses ctxt as a cache. rtargs and targs should not contain any types in rtparams or tparams. // fn is the generic function for which we are substituting. -func makeSubster(ctxt *types.Context, fn *types.Func, tparams *types.TypeParamList, targs []types.Type) *subster { - assert(tparams.Len() == len(targs), "makeSubster argument count must match") +func makeSubster(ctxt *types.Context, fn *types.Func, rtparams *types.TypeParamList, rtargs []types.Type, tparams *types.TypeParamList, targs []types.Type) *subster { + got := len(rtargs) + len(targs) + want := rtparams.Len() + tparams.Len() + if got != want { + panic(fmt.Sprintf("makeSubster argument count must match: got %d; want %d", got, want)) + } subst := &subster{ - replacements: make(map[*types.TypeParam]types.Type, tparams.Len()), + replacements: make(map[*types.TypeParam]types.Type, want), cache: make(map[types.Type]types.Type), origin: fn.Origin(), ctxt: ctxt, } + for i := 0; i < rtparams.Len(); i++ { + subst.replacements[rtparams.At(i)] = rtargs[i] + } for i := 0; i < tparams.Len(); i++ { subst.replacements[tparams.At(i)] = targs[i] } diff --git a/tools/vendor/golang.org/x/tools/go/ssa/wrappers.go b/tools/vendor/golang.org/x/tools/go/ssa/wrappers.go index aeb160eff..6cadd0497 100644 --- a/tools/vendor/golang.org/x/tools/go/ssa/wrappers.go +++ b/tools/vendor/golang.org/x/tools/go/ssa/wrappers.go @@ -40,14 +40,14 @@ import ( // following axes of variation when making changes: // - optional receiver indirection // - optional implicit field selections +// - optional method type arguments // - meth.Obj() may denote a concrete or an interface method // - the result may be a thunk or a wrapper. -func createWrapper(prog *Program, sel *selection) *Function { - obj := sel.obj.(*types.Func) // the declared function - sig := sel.typ.(*types.Signature) // type of this wrapper +func createWrapper(prog *Program, sel *selection, targs []types.Type) *Function { + obj := sel.obj.(*types.Func) // the declared function + name, sig := maybeInstance(prog, obj.Name(), sel.typ.(*types.Signature), targs) var recv *types.Var // wrapper's receiver or thunk's params[0] - name := obj.Name() var description string if sel.kind == types.MethodExpr { name += "$thunk" @@ -58,7 +58,7 @@ func createWrapper(prog *Program, sel *selection) *Function { recv = sig.Recv() } - description = fmt.Sprintf("%s for %s", description, sel.obj) + description = fmt.Sprintf("%s for %s", description, obj) if prog.mode&LogSource != 0 { defer logStack("create %s to (%s)", description, recv.Type())() } @@ -71,6 +71,7 @@ func createWrapper(prog *Program, sel *selection) *Function { Synthetic: description, Prog: prog, pos: obj.Pos(), + typeargs: targs, // wrappers have no syntax build: (*builder).buildWrapper, syntax: nil, @@ -79,6 +80,20 @@ func createWrapper(prog *Program, sel *selection) *Function { } } +// maybeInstance returns name and sig instantiated to reflect any type arguments in targs. +func maybeInstance(prog *Program, name string, sig *types.Signature, targs []types.Type) (string, *types.Signature) { + if len(targs) > 0 { + name = fmt.Sprintf("%s%s", name, targstr(targs)) + instSig, err := types.Instantiate(prog.ctxt, sig, targs, false) + if err != nil { + // validate was false, we should never get an error + panic(err) + } + sig = prog.canon.Type(instSig).(*types.Signature) + } + return name, sig +} + // buildWrapper builds fn.Body for a method wrapper. func (b *builder) buildWrapper(fn *Function) { var recv *types.Var // wrapper's receiver or thunk's params[0] @@ -137,7 +152,7 @@ func (b *builder) buildWrapper(fn *Function) { if !isPointer(r) { v = emitLoad(fn, v) } - c.Call.Value = fn.Prog.objectMethod(fn.object, b) + c.Call.Value = fn.Prog.objectMethod(fn.object, fn.typeargs, b) c.Call.Args = append(c.Call.Args, v) } else { c.Call.Method = fn.object @@ -184,19 +199,22 @@ func createParams(fn *Function, start int) { // Unlike createWrapper, createBound need perform no indirection or field // selections because that can be done before the closure is // constructed. -func createBound(prog *Program, obj *types.Func) *Function { +func createBound(prog *Program, obj *types.Func, targs []types.Type) *Function { description := fmt.Sprintf("bound method wrapper for %s", obj) if prog.mode&LogSource != 0 { defer logStack("%s", description)() } + name, sig := maybeInstance(prog, obj.Name(), obj.Type().(*types.Signature), targs) + /* bound method wrapper */ fn := &Function{ - name: obj.Name() + "$bound", + name: name + "$bound", object: obj, - Signature: changeRecv(obj.Type().(*types.Signature), nil), // drop receiver + Signature: changeRecv(sig, nil), // drop receiver Synthetic: description, Prog: prog, pos: obj.Pos(), + typeargs: targs, // wrappers have no syntax build: (*builder).buildBound, syntax: nil, @@ -215,7 +233,7 @@ func (b *builder) buildBound(fn *Function) { recv := fn.FreeVars[0] if !types.IsInterface(recvType(fn.object)) { // concrete - c.Call.Value = fn.Prog.objectMethod(fn.object, b) + c.Call.Value = fn.Prog.objectMethod(fn.object, fn.typeargs, b) c.Call.Args = []Value{recv} } else { c.Call.Method = fn.object @@ -246,12 +264,12 @@ func (b *builder) buildBound(fn *Function) { // f is a synthetic wrapper defined as if by: // // f := func(t T) { return t.meth() } -func createThunk(prog *Program, sel *selection) *Function { +func createThunk(prog *Program, sel *selection, targs []types.Type) *Function { if sel.kind != types.MethodExpr { panic(sel) } - fn := createWrapper(prog, sel) + fn := createWrapper(prog, sel, targs) if fn.Signature.Recv() != nil { panic(fn) // unexpected receiver } diff --git a/tools/vendor/golang.org/x/tools/internal/gcimporter/iexport.go b/tools/vendor/golang.org/x/tools/internal/gcimporter/iexport.go index 4c9450f4e..686f171d3 100644 --- a/tools/vendor/golang.org/x/tools/internal/gcimporter/iexport.go +++ b/tools/vendor/golang.org/x/tools/internal/gcimporter/iexport.go @@ -823,6 +823,9 @@ func (p *iexporter) doDecl(obj types.Object) { w.pos(m.Pos()) w.string(m.Name()) sig, _ := m.Type().(*types.Signature) + if w.p.version >= iexportVersionGenericMethods && w.bool(sig.TypeParams().Len() > 0) { + w.tparamList(obj.Name()+"."+m.Name(), sig.TypeParams(), obj.Pkg()) + } // Receiver type parameters are type arguments of the receiver type, so // their name must be qualified before exporting recv. diff --git a/tools/vendor/golang.org/x/tools/internal/gcimporter/iimport.go b/tools/vendor/golang.org/x/tools/internal/gcimporter/iimport.go index 1ee4e9354..7b1723e0f 100644 --- a/tools/vendor/golang.org/x/tools/internal/gcimporter/iimport.go +++ b/tools/vendor/golang.org/x/tools/internal/gcimporter/iimport.go @@ -48,13 +48,14 @@ func (r *intReader) uint64() uint64 { // Keep this in sync with constants in iexport.go. const ( - iexportVersionGo1_11 = 0 - iexportVersionPosCol = 1 - iexportVersionGo1_18 = 2 - iexportVersionGenerics = 2 - iexportVersion = iexportVersionGenerics - - iexportVersionCurrent = 2 + iexportVersionGo1_11 = 0 + iexportVersionPosCol = 1 + iexportVersionGo1_18 = 2 + iexportVersionGenerics = 2 + iexportVersionGenericMethods = 3 + iexportVersion = iexportVersionGenericMethods + + iexportVersionCurrent = 3 ) type ident struct { @@ -179,9 +180,9 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte version = int64(r.uint64()) switch version { - case iexportVersionGo1_18, iexportVersionPosCol, iexportVersionGo1_11: + case iexportVersionGenericMethods, iexportVersionGo1_18, iexportVersionPosCol, iexportVersionGo1_11: default: - if version > iexportVersionGo1_18 { + if version > iexportVersionGenericMethods { errorf("unstable iexport format version %d, just rebuild compiler and std library", version) } else { errorf("unknown iexport format version %d", version) @@ -614,6 +615,10 @@ func (r *importReader) obj(pkg *types.Package, name string) { for n := r.uint64(); n > 0; n-- { mpos := r.pos() mname := r.ident() + var tpars []*types.TypeParam + if r.p.version >= iexportVersionGenericMethods && r.bool() { + tpars = r.tparamList() + } recv := r.param(pkg) // If the receiver has any targs, set those as the @@ -628,8 +633,7 @@ func (r *importReader) obj(pkg *types.Package, name string) { rparams[i] = types.Unalias(targs.At(i)).(*types.TypeParam) } } - msig := r.signature(pkg, recv, rparams, nil) - + msig := r.signature(pkg, recv, rparams, tpars) named.AddMethod(types.NewFunc(mpos, pkg, mname, msig)) } } diff --git a/tools/vendor/golang.org/x/tools/internal/goplsexport/export.go b/tools/vendor/golang.org/x/tools/internal/goplsexport/export.go deleted file mode 100644 index 414c9cb03..000000000 --- a/tools/vendor/golang.org/x/tools/internal/goplsexport/export.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2025 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 goplsexport provides various backdoors to not-yet-published -// parts of x/tools that are needed by gopls. -package goplsexport - -import "golang.org/x/tools/go/analysis" - -var ( - ErrorsAsTypeModernizer *analysis.Analyzer // = modernize.errorsastypeAnalyzer - SlicesBackwardModernizer *analysis.Analyzer // = modernize.slicesbackwardAnalyzer - StdIteratorsModernizer *analysis.Analyzer // = modernize.stditeratorsAnalyzer - PlusBuildModernizer *analysis.Analyzer // = modernize.plusbuildAnalyzer - StringsCutModernizer *analysis.Analyzer // = modernize.stringscutAnalyzer - UnsafeFuncsModernizer *analysis.Analyzer // = modernize.unsafeFuncsAnalyzer - AtomicTypesModernizer *analysis.Analyzer // = modernize.atomicTypesAnalyzer - EmbedLitModernizer *analysis.Analyzer // = modernize.embedLitAnalyzer -) diff --git a/tools/vendor/golang.org/x/tools/internal/imports/fix.go b/tools/vendor/golang.org/x/tools/internal/imports/fix.go index d29ecfb01..b99ea6c91 100644 --- a/tools/vendor/golang.org/x/tools/internal/imports/fix.go +++ b/tools/vendor/golang.org/x/tools/internal/imports/fix.go @@ -273,7 +273,6 @@ func (p *pass) loadPackageNames(ctx context.Context, imports []*ImportInfo) erro } unknown = append(unknown, imp.ImportPath) } - names, err := p.source.LoadPackageNames(ctx, p.srcDir, unknown) if err != nil { return err diff --git a/tools/vendor/golang.org/x/tools/internal/imports/imports.go b/tools/vendor/golang.org/x/tools/internal/imports/imports.go index b5f5218b5..072293835 100644 --- a/tools/vendor/golang.org/x/tools/internal/imports/imports.go +++ b/tools/vendor/golang.org/x/tools/internal/imports/imports.go @@ -74,6 +74,10 @@ func Process(filename string, src []byte, opt *Options) (formatted []byte, err e // Note that filename's directory influences which imports can be chosen, // so it is important that filename be accurate. func FixImports(ctx context.Context, filename string, src []byte, goroot string, logf func(string, ...any), source Source) (fixes []*ImportFix, err error) { + if source == nil { + // In case someone adds a defective call from a new place + panic("source is nil") + } ctx, done := event.Start(ctx, "imports.FixImports") defer done() diff --git a/tools/vendor/golang.org/x/tools/internal/refactor/delete.go b/tools/vendor/golang.org/x/tools/internal/refactor/delete.go index 25547f04f..b655b8a2e 100644 --- a/tools/vendor/golang.org/x/tools/internal/refactor/delete.go +++ b/tools/vendor/golang.org/x/tools/internal/refactor/delete.go @@ -439,7 +439,7 @@ Big: inStmtList = true case *ast.ForStmt: use(parent.For, parent.Body.Lbrace) - // special handling, as init;cond;post BlockStmt is not a statment list + // special handling, as init;cond;post BlockStmt is not a statement list if parent.Init != nil && parent.Cond != nil && stmt == parent.Init && lineOf(parent.Cond.Pos()) == lineOf(stmt.End()) { rightStmt = parent.Cond.Pos() } else if parent.Post != nil && parent.Cond != nil && stmt == parent.Post && lineOf(parent.Cond.End()) == lineOf(stmt.Pos()) { diff --git a/tools/vendor/golang.org/x/tools/internal/typesinternal/element.go b/tools/vendor/golang.org/x/tools/internal/typesinternal/element.go index 5fe4d8abc..89eeea165 100644 --- a/tools/vendor/golang.org/x/tools/internal/typesinternal/element.go +++ b/tools/vendor/golang.org/x/tools/internal/typesinternal/element.go @@ -37,6 +37,10 @@ func ForEachElement(rtypes *typeutil.Map, msets *typeutil.MethodSetCache, T type tmset := msets.MethodSet(T) for method := range tmset.Methods() { sig := method.Type().(*types.Signature) + if sig.TypeParams() != nil { + continue // skip type-parameterized methods + } + // It is tempting to call visit(sig, false) // but, as noted in golang.org/cl/65450043, // the Signature.Recv field is ignored by @@ -123,10 +127,10 @@ func ForEachElement(rtypes *typeutil.Map, msets *typeutil.MethodSetCache, T type case *types.TypeParam, *types.Union: // forEachReachable must not be called on parameterized types. - panic(T) + panic(fmt.Sprintf("ForEachElement called on type containing %T", T)) default: - panic(T) + panic(fmt.Sprintf("ForEachElement called on unexpected type %T", T)) } } visit(T, false) diff --git a/tools/vendor/golang.org/x/tools/internal/typesinternal/types.go b/tools/vendor/golang.org/x/tools/internal/typesinternal/types.go index 6582cc81f..d2c0b4c5f 100644 --- a/tools/vendor/golang.org/x/tools/internal/typesinternal/types.go +++ b/tools/vendor/golang.org/x/tools/internal/typesinternal/types.go @@ -22,6 +22,7 @@ import ( "go/ast" "go/token" "go/types" + "iter" "reflect" "golang.org/x/tools/go/ast/inspector" @@ -242,3 +243,30 @@ func ObjectKind(obj types.Object) string { } return "unknown symbol" } + +// ImplicitFieldSelections returns the sequence of implicit embedded fields +// traversed by the given selection. It skips the final leaf field or method. +// The boolean component indicates whether the traversal traversed a pointer. +func ImplicitFieldSelections(seln types.Selection) iter.Seq2[*types.Var, bool] { + return func(yield func(*types.Var, bool) bool) { + var ( + t = seln.Recv() + indices = seln.Index() + ) + for _, idx := range indices[:len(indices)-1] { + ptr, isPtr := t.Underlying().(*types.Pointer) + if isPtr { + t = ptr.Elem() + } + structType, ok := t.Underlying().(*types.Struct) + if !ok { + break + } + field := structType.Field(idx) + if !yield(field, isPtr) { + break + } + t = field.Type() + } + } +} diff --git a/tools/vendor/golang.org/x/tools/refactor/satisfy/find.go b/tools/vendor/golang.org/x/tools/refactor/satisfy/find.go index 3d21ce6d2..720ecc17d 100644 --- a/tools/vendor/golang.org/x/tools/refactor/satisfy/find.go +++ b/tools/vendor/golang.org/x/tools/refactor/satisfy/find.go @@ -8,8 +8,13 @@ // interface, and this fact is necessary for the package to be // well-typed. // -// It requires well-typed inputs. -package satisfy // import "golang.org/x/tools/refactor/satisfy" +// It requires well-typed inputs, and may panic otherwise. +// +// This package reimplements parts of the type checker. See +// https://go.dev/issue/70638 for a proposal to expose the the work +// already done by the type checker, which would make this package +// redundant. +package satisfy // NOTES: // @@ -40,6 +45,7 @@ import ( "go/ast" "go/token" "go/types" + "iter" "golang.org/x/tools/go/types/typeutil" "golang.org/x/tools/internal/typeparams" @@ -127,13 +133,16 @@ func (f *Finder) exprN(e ast.Expr) types.Type { case *ast.CallExpr: // x, err := f(args) - sig := typeparams.CoreType(f.expr(e.Fun)).(*types.Signature) - f.call(sig, e.Args) + if sig := hasUnderlyingTermOf[*types.Signature](f.expr(e.Fun)); sig != nil { + f.call(sig, e.Args) + } case *ast.IndexExpr: // y, ok := x[i] x := f.expr(e.X) - f.assign(f.expr(e.Index), typeparams.CoreType(x).(*types.Map).Key()) + if m := hasUnderlyingTermOf[*types.Map](x); m != nil { + f.assign(f.expr(e.Index), m.Key()) + } case *ast.TypeAssertExpr: // y, ok := x.(T) @@ -216,16 +225,19 @@ func (f *Finder) builtin(obj *types.Builtin, sig *types.Signature, args []ast.Ex f.expr(args[1]) } else { // append(x, y, z) - tElem := typeparams.CoreType(s).(*types.Slice).Elem() - for _, arg := range args[1:] { - f.assign(tElem, f.expr(arg)) + if s := hasUnderlyingTermOf[*types.Slice](s); s != nil { + for _, arg := range args[1:] { + f.assign(s.Elem(), f.expr(arg)) + } } } case "delete": m := f.expr(args[0]) k := f.expr(args[1]) - f.assign(typeparams.CoreType(m).(*types.Map).Key(), k) + if m := hasUnderlyingTermOf[*types.Map](m); m != nil { + f.assign(m.Key(), k) + } default: // ordinary call @@ -357,38 +369,37 @@ func (f *Finder) expr(e ast.Expr) types.Type { f.sig = saved case *ast.CompositeLit: - switch T := typeparams.CoreType(typeparams.Deref(tv.Type)).(type) { - case *types.Struct: - for i, elem := range e.Elts { - if kv, ok := elem.(*ast.KeyValueExpr); ok { - f.assign(f.info.Uses[kv.Key.(*ast.Ident)].Type(), f.expr(kv.Value)) - } else { - f.assign(T.Field(i).Type(), f.expr(elem)) + for term := range terms(typeparams.Deref(tv.Type)) { + switch T := term.Underlying().(type) { + case *types.Struct: + for i, elem := range e.Elts { + if kv, ok := elem.(*ast.KeyValueExpr); ok { + f.assign(f.info.Uses[kv.Key.(*ast.Ident)].Type(), f.expr(kv.Value)) + } else { + f.assign(T.Field(i).Type(), f.expr(elem)) + } } - } - case *types.Map: - for _, elem := range e.Elts { - elem := elem.(*ast.KeyValueExpr) - f.assign(T.Key(), f.expr(elem.Key)) - f.assign(T.Elem(), f.expr(elem.Value)) - } + case *types.Map: + for _, elem := range e.Elts { + elem := elem.(*ast.KeyValueExpr) + f.assign(T.Key(), f.expr(elem.Key)) + f.assign(T.Elem(), f.expr(elem.Value)) + } - case *types.Array, *types.Slice: - tElem := T.(interface { - Elem() types.Type - }).Elem() - for _, elem := range e.Elts { - if kv, ok := elem.(*ast.KeyValueExpr); ok { - // ignore the key - f.assign(tElem, f.expr(kv.Value)) - } else { - f.assign(tElem, f.expr(elem)) + case *types.Array, *types.Slice: + tElem := T.(interface{ Elem() types.Type }).Elem() + for _, elem := range e.Elts { + if kv, ok := elem.(*ast.KeyValueExpr); ok { + // ignore the key + f.assign(tElem, f.expr(kv.Value)) + } else { + f.assign(tElem, f.expr(elem)) + } } + default: + panic(fmt.Sprintf("unexpected composite literal type %T: %v", tv.Type, tv.Type.String())) } - - default: - panic(fmt.Sprintf("unexpected composite literal type %T: %v", tv.Type, tv.Type.String())) } case *ast.ParenExpr: @@ -411,8 +422,8 @@ func (f *Finder) expr(e ast.Expr) types.Type { // x[i] or m[k] -- index or lookup operation x := f.expr(e.X) i := f.expr(e.Index) - if ux, ok := typeparams.CoreType(x).(*types.Map); ok { - f.assign(ux.Key(), i) + if m := hasUnderlyingTermOf[*types.Map](x); m != nil { + f.assign(m.Key(), i) } } @@ -464,7 +475,9 @@ func (f *Finder) expr(e ast.Expr) types.Type { } // ordinary call - f.call(typeparams.CoreType(f.expr(e.Fun)).(*types.Signature), e.Args) + if sig := hasUnderlyingTermOf[*types.Signature](f.expr(e.Fun)); sig != nil { + f.call(sig, e.Args) + } } case *ast.StarExpr: @@ -524,7 +537,9 @@ func (f *Finder) stmt(s ast.Stmt) { case *ast.SendStmt: ch := f.expr(s.Chan) val := f.expr(s.Value) - f.assign(typeparams.CoreType(ch).(*types.Chan).Elem(), val) + if c := hasUnderlyingTermOf[*types.Chan](ch); c != nil { + f.assign(c.Elem(), val) + } case *ast.IncDecStmt: f.expr(s.X) @@ -671,36 +686,36 @@ func (f *Finder) stmt(s ast.Stmt) { if s.Tok == token.ASSIGN { if s.Key != nil { k := f.expr(s.Key) - var xelem types.Type // Keys of array, *array, slice, string aren't interesting // since the RHS key type is just an int. - switch ux := typeparams.CoreType(x).(type) { - case *types.Chan: - xelem = ux.Elem() - case *types.Map: - xelem = ux.Key() - } - if xelem != nil { - f.assign(k, xelem) + for term := range terms(x) { + switch term := term.Underlying().(type) { + case *types.Chan: + f.assign(k, term.Elem()) + case *types.Map: + f.assign(k, term.Key()) + } } } if s.Value != nil { val := f.expr(s.Value) - var xelem types.Type // Values of type strings aren't interesting because // the RHS value type is just a rune. - switch ux := typeparams.CoreType(x).(type) { - case *types.Array: - xelem = ux.Elem() - case *types.Map: - xelem = ux.Elem() - case *types.Pointer: // *array - xelem = typeparams.CoreType(typeparams.Deref(ux)).(*types.Array).Elem() - case *types.Slice: - xelem = ux.Elem() - } - if xelem != nil { - f.assign(val, xelem) + for term := range terms(x) { + switch term := term.Underlying().(type) { + case *types.Pointer: + for term := range terms(term.Elem()) { + if array, ok := term.Underlying().(*types.Array); ok { + f.assign(val, array.Elem()) + } + } + case *types.Array: + f.assign(val, term.Elem()) + case *types.Map: + f.assign(val, term.Elem()) + case *types.Slice: + f.assign(val, term.Elem()) + } } } } @@ -726,3 +741,40 @@ func instance(info *types.Info, expr ast.Expr) bool { _, ok := info.Instances[id] return ok } + +// -- type-set helpers -- + +// hasUnderlyingTermOf reports whether terms(t) contains a +// term whose underlying type has top-level type constructor T +// (e.g. *types.Map for a map). +// If so, it returns an arbitrary one. +// Otherwise it returns the zero value (nil). +// +// This arbitrariness would be a hazard if this function were +// published more widely, but in this package it is used only for +// structural operations (indexing, etc) that require the relevant +// component types to be identical across all terms in the operand's +// type set. +func hasUnderlyingTermOf[T types.Type](t types.Type) T { + for term := range terms(t) { + if under, ok := term.Underlying().(T); ok { + return under + } + } + return *new(T) // e.g. (*types.Map)(nil) +} + +// terms returns the sequence of terms in the type set of t. +// The boolean reports whether the term has a tilde. +// TODO(adonovan): replace with solution to go.dev/issue/61013. +func terms(t types.Type) iter.Seq2[types.Type, bool] { + return func(yield func(types.Type, bool) bool) { + if terms, err := typeparams.NormalTerms(t); err == nil { + for _, term := range terms { + if !yield(term.Type(), term.Tilde()) { + break + } + } + } + } +} diff --git a/tools/vendor/modules.txt b/tools/vendor/modules.txt index ced171562..9af9ef644 100644 --- a/tools/vendor/modules.txt +++ b/tools/vendor/modules.txt @@ -4,7 +4,7 @@ # 4d63.com/gochecknoglobals v0.2.2 ## explicit; go 1.18 4d63.com/gochecknoglobals/checknoglobals -# charm.land/lipgloss/v2 v2.0.3 +# charm.land/lipgloss/v2 v2.0.4 ## explicit; go 1.25.0 charm.land/lipgloss/v2 # codeberg.org/chavacava/garif v0.2.1 @@ -217,7 +217,7 @@ github.com/davecgh/go-spew/spew # github.com/denis-tingaikin/go-header v0.5.0 ## explicit; go 1.21 github.com/denis-tingaikin/go-header -# github.com/dlclark/regexp2/v2 v2.2.1 +# github.com/dlclark/regexp2/v2 v2.2.2 ## explicit; go 1.25 github.com/dlclark/regexp2/v2 github.com/dlclark/regexp2/v2/helpers @@ -231,8 +231,8 @@ github.com/fatih/color # github.com/fatih/structtag v1.2.0 ## explicit; go 1.12 github.com/fatih/structtag -# github.com/firefart/nonamedreturns v1.0.6 -## explicit; go 1.23.0 +# github.com/firefart/nonamedreturns v1.0.7 +## explicit; go 1.25.0 github.com/firefart/nonamedreturns/analyzer # github.com/fsnotify/fsnotify v1.10.1 ## explicit; go 1.23 @@ -956,18 +956,18 @@ go.yaml.in/yaml/v3 # golang.org/x/exp/typeparams v0.0.0-20260603202125-055de637280b ## explicit; go 1.25.0 golang.org/x/exp/typeparams -# golang.org/x/mod v0.36.0 +# golang.org/x/mod v0.37.0 ## explicit; go 1.25.0 golang.org/x/mod/internal/lazyregexp golang.org/x/mod/modfile golang.org/x/mod/module golang.org/x/mod/semver golang.org/x/mod/sumdb/dirhash -# golang.org/x/sync v0.20.0 +# golang.org/x/sync v0.21.0 ## explicit; go 1.25.0 golang.org/x/sync/errgroup golang.org/x/sync/semaphore -# golang.org/x/sys v0.45.0 +# golang.org/x/sys v0.46.0 ## explicit; go 1.25.0 golang.org/x/sys/unix golang.org/x/sys/windows @@ -994,7 +994,7 @@ golang.org/x/text/runes golang.org/x/text/transform golang.org/x/text/unicode/norm golang.org/x/text/width -# golang.org/x/tools v0.45.0 +# golang.org/x/tools v0.46.0 ## explicit; go 1.25.0 golang.org/x/tools/go/analysis golang.org/x/tools/go/analysis/passes/appends @@ -1079,7 +1079,6 @@ golang.org/x/tools/internal/fmtstr golang.org/x/tools/internal/gcimporter golang.org/x/tools/internal/gocommand golang.org/x/tools/internal/gopathwalk -golang.org/x/tools/internal/goplsexport golang.org/x/tools/internal/imports golang.org/x/tools/internal/moreiters golang.org/x/tools/internal/packagepath @@ -1333,4 +1332,4 @@ mvdan.cc/gofumpt/internal/version mvdan.cc/unparam/check # github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.0 # github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.7 -# github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.3 +# github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.4 diff --git a/vendor/github.com/IBM/platform-services-go-sdk/common/version.go b/vendor/github.com/IBM/platform-services-go-sdk/common/version.go index 9229faa90..80d754563 100644 --- a/vendor/github.com/IBM/platform-services-go-sdk/common/version.go +++ b/vendor/github.com/IBM/platform-services-go-sdk/common/version.go @@ -17,4 +17,4 @@ package common // Version of the SDK -const Version = "0.99.0" +const Version = "0.99.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index ff84834dd..46cb77c20 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,4 +3,4 @@ package aws // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.41.12" +const goModuleVersion = "1.42.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go index c266996de..14225a53a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go @@ -4,6 +4,7 @@ import ( "math" "time" + "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/rand" "github.com/aws/aws-sdk-go-v2/internal/timeconv" ) @@ -12,9 +13,20 @@ import ( // number of attempts. type ExponentialJitterBackoff struct { maxBackoff time.Duration - // precomputed number of attempts needed to reach max backoff. + // precomputed number of attempts needed to reach max backoff (legacy mode). maxBackoffAttempts float64 + // Base delay for non-throttle errors (x in the formula t_i = b * min(x * r^i, MAX_BACKOFF)). + baseDelay time.Duration + + // Throttle error checker. When set and the error is a throttle, the base + // delay is 1s regardless of the configured baseDelay. + throttle IsErrorThrottle + + // When true, applies MAX_BACKOFF before jitter and uses throttle-aware + // base delay. + retries2026 bool + randFloat64 func() (float64, error) } @@ -25,13 +37,53 @@ func NewExponentialJitterBackoff(maxBackoff time.Duration) *ExponentialJitterBac maxBackoff: maxBackoff, maxBackoffAttempts: math.Log2( float64(maxBackoff) / float64(time.Second)), + baseDelay: time.Second, randFloat64: rand.CryptoRandFloat64, } } +// exponentialJitterBackoffOption is a functional option for ExponentialJitterBackoff. +type exponentialJitterBackoffOption func(*ExponentialJitterBackoff) + +// withBaseDelay sets the base delay for non-throttle errors. +func withBaseDelay(d time.Duration) exponentialJitterBackoffOption { + return func(j *ExponentialJitterBackoff) { + j.baseDelay = d + } +} + +// withThrottleCheck sets the throttle error checker used to determine if the +// backoff should use the throttle base delay (1s) instead of the configured +// base delay. +func withThrottleCheck(t IsErrorThrottle) exponentialJitterBackoffOption { + return func(j *ExponentialJitterBackoff) { + j.throttle = t + } +} + +// newExponentialJitterBackoffWithOptions returns an ExponentialJitterBackoff +// with the given options applied. +func newExponentialJitterBackoffWithOptions(maxBackoff time.Duration, optFns ...exponentialJitterBackoffOption) *ExponentialJitterBackoff { + j := NewExponentialJitterBackoff(maxBackoff) + j.retries2026 = true + for _, fn := range optFns { + fn(j) + } + return j +} + // BackoffDelay returns the duration to wait before the next attempt should be // made. Returns an error if unable get a duration. func (j *ExponentialJitterBackoff) BackoffDelay(attempt int, err error) (time.Duration, error) { + if j.retries2026 { + return j.backoffDelay2026(attempt, err) + } + return j.backoffDelayLegacy(attempt, err) +} + +// backoffDelayLegacy preserves the original backoff formula: b * 2^i, capped +// at maxBackoff. +func (j *ExponentialJitterBackoff) backoffDelayLegacy(attempt int, err error) (time.Duration, error) { if attempt > int(j.maxBackoffAttempts) { return j.maxBackoff, nil } @@ -47,3 +99,26 @@ func (j *ExponentialJitterBackoff) BackoffDelay(attempt int, err error) (time.Du return timeconv.FloatSecondsDur(delaySeconds), nil } + +// backoffDelay2026 uses throttle-aware base delay and applies MAX_BACKOFF +// before jitter: t_i = b * min(x * 2^i, MAX_BACKOFF). +func (j *ExponentialJitterBackoff) backoffDelay2026(attempt int, err error) (time.Duration, error) { + x := j.baseDelay + if j.throttle != nil && j.throttle.IsErrorThrottle(err) == aws.TrueTernary { + x = time.Second + } + + b, randErr := j.randFloat64() + if randErr != nil { + return 0, randErr + } + + ri := math.Pow(2, float64(attempt)) + delaySeconds := float64(x) / float64(time.Second) * ri + maxBackoffSeconds := float64(j.maxBackoff) / float64(time.Second) + if delaySeconds > maxBackoffSeconds { + delaySeconds = maxBackoffSeconds + } + + return timeconv.FloatSecondsDur(b * delaySeconds), nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go index 52acb62f9..ab024de04 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go @@ -233,9 +233,11 @@ func (r *Attempt) handleAttempt( "failed to release retry token after request error, %w", err) } // Release the attempt token based on the state of the attempt's error (if any). - if releaseError := releaseAttemptToken(err); releaseError != nil && err != nil { - return out, attemptResult, nopRelease, fmt.Errorf( - "failed to release initial token after request error, %w", err) + if !newRetries2026() || attemptNum == 1 { + if releaseError := releaseAttemptToken(err); releaseError != nil && err != nil { + return out, attemptResult, nopRelease, fmt.Errorf( + "failed to release initial token after request error, %w", err) + } } // If there was no error making the attempt, nothing further to do. There // will be nothing to retry. @@ -276,6 +278,13 @@ func (r *Attempt) handleAttempt( // Get a retry token that will be released after the releaseRetryToken, retryTokenErr := r.retryer.GetRetryToken(ctx, err) if retryTokenErr != nil { + // Long-polling operations must still back off when quota is exceeded. + if newRetries2026() && internalcontext.GetIsLongPolling(ctx) { + if retryDelay, delayErr := r.retryer.RetryDelay(attemptNum-1, err); delayErr == nil { + retryDelay = adjustForRetryAfterHeader(retryDelay, err, logger, r.LogAttempts) + _ = sdk.SleepWithContext(ctx, retryDelay) + } + } return out, attemptResult, nopRelease, errors.Join(err, retryTokenErr) } @@ -285,10 +294,17 @@ func (r *Attempt) handleAttempt( // Get the retry delay before another attempt can be made, and sleep for // that time. Potentially early exist if the sleep is canceled via the // context. - retryDelay, reqErr := r.retryer.RetryDelay(attemptNum, err) + attempt := attemptNum + if newRetries2026() { + attempt = attemptNum - 1 + } + retryDelay, reqErr := r.retryer.RetryDelay(attempt, err) if reqErr != nil { return out, attemptResult, releaseRetryToken, reqErr } + if newRetries2026() { + retryDelay = adjustForRetryAfterHeader(retryDelay, err, logger, r.LogAttempts) + } if reqErr = sdk.SleepWithContext(ctx, retryDelay); reqErr != nil { err = &aws.RequestCanceledError{Err: reqErr} return out, attemptResult, releaseRetryToken, err @@ -423,6 +439,43 @@ func AddRetryMiddlewares(stack *smithymiddle.Stack, options AddRetryMiddlewaresO return nil } +// adjustForRetryAfterHeader checks for the x-amz-retry-after response header +// and clamps the backoff duration accordingly. The header value is an integer +// representing milliseconds. The result is clamped to [t_i, 5s + t_i] where +// t_i is the jittered exponential backoff duration. Invalid header values are +// ignored. +func adjustForRetryAfterHeader(backoff time.Duration, err error, logger logging.Logger, logAttempts bool) time.Duration { + var re *http.ResponseError + if !errors.As(err, &re) || re.Response == nil || re.Response.Response == nil { + return backoff + } + + headerVal := re.Response.Header.Get("X-Amz-Retry-After") + if headerVal == "" { + return backoff + } + + ms, parseErr := strconv.ParseInt(headerVal, 10, 64) + if parseErr != nil || ms < 0 { + if logAttempts { + logger.Logf(logging.Debug, "ignoring invalid x-amz-retry-after header value %q", headerVal) + } + return backoff + } + + retryAfter := time.Duration(ms) * time.Millisecond + minDuration := backoff + maxDuration := 5*time.Second + backoff + + if retryAfter < minDuration { + return minDuration + } + if retryAfter > maxDuration { + return maxDuration + } + return retryAfter +} + // Determines the value of exception.type for metrics purposes. We prefer an // API-specific error code, otherwise it's just the Go type for the value. func errorType(err error) string { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go index af81635b3..c240fb09b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go @@ -72,6 +72,19 @@ func (r *withMaxBackoffDelay) RetryDelay(attempt int, err error) (time.Duration, return r.backoff.BackoffDelay(attempt, err) } +// AddWithLongPolling returns a retryer that is marked as long-polling. +// Long-polling operations will back off even when the retry quota is +// exhausted. +func AddWithLongPolling(r aws.Retryer) aws.Retryer { + return &withLongPolling{RetryerV2: wrapAsRetryerV2(r)} +} + +type withLongPolling struct { + aws.RetryerV2 +} + +func (w *withLongPolling) IsLongPolling() bool { return true } + type wrappedAsRetryerV2 struct { aws.Retryer } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go index d5ea93222..f2f9660da 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go @@ -3,6 +3,7 @@ package retry import ( "context" "fmt" + "os" "time" "github.com/aws/aws-sdk-go-v2/aws/ratelimit" @@ -35,8 +36,16 @@ const ( const ( DefaultRetryRateTokens uint = 500 DefaultRetryCost uint = 5 - DefaultRetryTimeoutCost uint = 10 DefaultNoRetryIncrement uint = 1 + + // DefaultRetryTimeoutCost is the cost to deduct from the RateLimiter's + // token bucket per retry caused by timeout error. + // + // When AWS_NEW_RETRIES_2026 is set to "true", timeouts are no longer + // treated differently than other transient errors. The discounted cost + // is instead applied to throttling errors via DefaultThrottlingRetryCost. + DefaultRetryTimeoutCost uint = 10 + DefaultThrottlingRetryCost uint = 5 ) // DefaultRetryableHTTPStatusCodes is the default set of HTTP status codes the SDK @@ -121,6 +130,12 @@ type StandardOptions struct { // It is safe to append to this list in NewStandard's functional options. Timeouts []IsErrorTimeout + // Set of strategies to determine if the attempt failed due to a throttle + // error. Used to determine the retry token cost. + // + // It is safe to append to this list in NewStandard's functional options. + Throttles []IsErrorThrottle + // Provides the rate limiting strategy for rate limiting attempt retries // across all attempts the retryer is being used with. // @@ -129,10 +144,14 @@ type StandardOptions struct { // consume more tokens than what's available results in operation failure. // The default implementation is parameterized as follows: // - a capacity of 500 (DefaultRetryRateTokens) - // - a retry caused by a timeout costs 10 tokens (DefaultRetryCost) - // - a retry caused by other errors costs 5 tokens (DefaultRetryTimeoutCost) + // - a retry caused by a timeout costs 10 tokens (DefaultRetryTimeoutCost) + // - a retry caused by other errors costs 5 tokens (DefaultRetryCost) // - an operation that succeeds on the 1st attempt adds 1 token (DefaultNoRetryIncrement) // + // When AWS_NEW_RETRIES_2026 is set to "true", the costs change: + // - a retry costs 14 tokens + // - a retry caused by a throttling error costs 5 tokens (DefaultThrottlingRetryCost) + // // You can disable rate limiting by setting this field to ratelimit.None. RateLimiter RateLimiter @@ -141,11 +160,23 @@ type StandardOptions struct { // The cost to deduct from the RateLimiter's token bucket per retry caused // by timeout error. + // + // When AWS_NEW_RETRIES_2026 is set to "true", this field is unused. + // Throttling errors use ThrottlingRetryCost instead. RetryTimeoutCost uint + // The cost to deduct from the RateLimiter's token bucket per retry caused + // by a throttling error. Only used when AWS_NEW_RETRIES_2026 is "true". + ThrottlingRetryCost uint + // The cost to payback to the RateLimiter's token bucket for successful // attempts. NoRetryIncrement uint + + // BaseDelay is the base backoff delay for non-throttle retryable errors. + // Throttling errors always use 1s. Defaults to 50ms if zero. + // Only used when AWS_NEW_RETRIES_2026 is "true"; ignored in legacy mode. + BaseDelay time.Duration } // RateLimiter provides the interface for limiting the rate of attempt retries @@ -161,6 +192,7 @@ type RateLimiter interface { type Standard struct { options StandardOptions + throttle IsErrorThrottle timeout IsErrorTimeout retryable IsErrorRetryable backoff BackoffDelayer @@ -169,17 +201,7 @@ type Standard struct { // NewStandard initializes a standard retry behavior with defaults that can be // overridden via functional options. func NewStandard(fnOpts ...func(*StandardOptions)) *Standard { - o := StandardOptions{ - MaxAttempts: DefaultMaxAttempts, - MaxBackoff: DefaultMaxBackoff, - Retryables: append([]IsErrorRetryable{}, DefaultRetryables...), - Timeouts: append([]IsErrorTimeout{}, DefaultTimeouts...), - - RateLimiter: ratelimit.NewTokenRateLimit(DefaultRetryRateTokens), - RetryCost: DefaultRetryCost, - RetryTimeoutCost: DefaultRetryTimeoutCost, - NoRetryIncrement: DefaultNoRetryIncrement, - } + o := standardDefaults() for _, fn := range fnOpts { fn(&o) } @@ -189,13 +211,25 @@ func NewStandard(fnOpts ...func(*StandardOptions)) *Standard { backoff := o.Backoff if backoff == nil { - backoff = NewExponentialJitterBackoff(o.MaxBackoff) + if newRetries2026() { + baseDelay := o.BaseDelay + if baseDelay == 0 { + baseDelay = 50 * time.Millisecond + } + backoff = newExponentialJitterBackoffWithOptions(o.MaxBackoff, + withBaseDelay(baseDelay), + withThrottleCheck(IsErrorThrottles(o.Throttles)), + ) + } else { + backoff = NewExponentialJitterBackoff(o.MaxBackoff) + } } return &Standard{ options: o, backoff: backoff, retryable: IsErrorRetryables(o.Retryables), + throttle: IsErrorThrottles(o.Throttles), timeout: IsErrorTimeouts(o.Timeouts), } } @@ -244,8 +278,14 @@ func (s *Standard) noRetryIncrement() error { func (s *Standard) GetRetryToken(ctx context.Context, opErr error) (func(error) error, error) { cost := s.options.RetryCost - if s.timeout.IsErrorTimeout(opErr).Bool() { - cost = s.options.RetryTimeoutCost + if newRetries2026() { + if s.throttle.IsErrorThrottle(opErr).Bool() { + cost = s.options.ThrottlingRetryCost + } + } else { + if s.timeout.IsErrorTimeout(opErr).Bool() { + cost = s.options.RetryTimeoutCost + } } fn, err := s.options.RateLimiter.GetToken(ctx, cost) @@ -267,3 +307,37 @@ func (f releaseToken) release(err error) error { return f() } + +func newRetries2026() bool { + return os.Getenv("AWS_NEW_RETRIES_2026") == "true" +} + +func standardDefaults() StandardOptions { + if newRetries2026() { + return StandardOptions{ + MaxAttempts: DefaultMaxAttempts, + MaxBackoff: DefaultMaxBackoff, + Retryables: append([]IsErrorRetryable{}, DefaultRetryables...), + Timeouts: append([]IsErrorTimeout{}, DefaultTimeouts...), + Throttles: append([]IsErrorThrottle{}, DefaultThrottles...), + + RateLimiter: ratelimit.NewTokenRateLimit(DefaultRetryRateTokens), + RetryCost: 14, + RetryTimeoutCost: DefaultRetryTimeoutCost, + ThrottlingRetryCost: DefaultThrottlingRetryCost, + NoRetryIncrement: DefaultNoRetryIncrement, + } + } + return StandardOptions{ + MaxAttempts: DefaultMaxAttempts, + MaxBackoff: DefaultMaxBackoff, + Retryables: append([]IsErrorRetryable{}, DefaultRetryables...), + Timeouts: append([]IsErrorTimeout{}, DefaultTimeouts...), + Throttles: append([]IsErrorThrottle{}, DefaultThrottles...), + + RateLimiter: ratelimit.NewTokenRateLimit(DefaultRetryRateTokens), + RetryCost: DefaultRetryCost, + RetryTimeoutCost: DefaultRetryTimeoutCost, + NoRetryIncrement: DefaultNoRetryIncrement, + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md index 5fed89811..291357a31 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md @@ -1,3 +1,24 @@ +# v1.32.25 (2026-06-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.24 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.23 (2026-06-04) + +* **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.22 (2026-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.21 (2026-06-02) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.32.20 (2026-05-29) * **Dependency Update**: Update to smithy-go v1.26.0. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go index 0f69bcd8b..8086d6dbc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go @@ -3,4 +3,4 @@ package config // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.32.20" +const goModuleVersion = "1.32.25" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md index 87c87690a..18b02dee8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md @@ -1,3 +1,24 @@ +# v1.19.24 (2026-06-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.23 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.22 (2026-06-04) + +* **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.21 (2026-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.20 (2026-06-02) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.19.19 (2026-05-29) * **Dependency Update**: Update to smithy-go v1.26.0. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go index 0bf0937d6..161da7f54 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go @@ -3,4 +3,4 @@ package credentials // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.19.19" +const goModuleVersion = "1.19.24" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md index 8a90d8521..a2f7103a9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md @@ -1,3 +1,20 @@ +# v1.18.29 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.28 (2026-06-04) + +* **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.27 (2026-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.26 (2026-06-02) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.18.25 (2026-05-29) * **Dependency Update**: Update to smithy-go v1.26.0. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go index 7f28da5a4..64d469b04 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go @@ -3,4 +3,4 @@ package imds // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.18.25" +const goModuleVersion = "1.18.29" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md index d852b8f4d..26f507f8b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.4.29 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.4.28 (2026-06-04) * **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index 6ddb04b85..851fed2b3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.4.28" +const goModuleVersion = "1.4.29" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go index f0c283d39..52f4ebc25 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go @@ -50,3 +50,16 @@ func GetAttemptSkewContext(ctx context.Context) time.Duration { x, _ := middleware.GetStackValue(ctx, clockSkew{}).(time.Duration) return x } + +type longPollingKey struct{} + +// SetIsLongPolling marks the operation as long-polling on the context. +func SetIsLongPolling(ctx context.Context, v bool) context.Context { + return middleware.WithStackValue(ctx, longPollingKey{}, v) +} + +// GetIsLongPolling returns whether the operation is long-polling. +func GetIsLongPolling(ctx context.Context) bool { + v, _ := middleware.GetStackValue(ctx, longPollingKey{}).(bool) + return v +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md index 76865256e..508593b45 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md @@ -1,3 +1,7 @@ +# v2.7.29 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + # v2.7.28 (2026-06-04) * **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index 27c93d393..1c161a0a7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -const goModuleVersion = "2.7.28" +const goModuleVersion = "2.7.29" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md index df5f1fa11..554f43b5e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.4.30 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.4.29 (2026-06-04) * **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go index 46a99d565..2703ec797 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go @@ -3,4 +3,4 @@ package v4a // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.4.29" +const goModuleVersion = "1.4.30" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md index 52631ffb9..739074768 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md @@ -1,3 +1,11 @@ +# v1.54.5 (2026-06-12) + +* **Documentation**: Updating documentation for select service-specific credential APIs + +# v1.54.4 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.54.3 (2026-06-04) * **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go index c9a37828e..7026ac283 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go @@ -18,16 +18,24 @@ import ( // You can have a maximum of two sets of service-specific credentials for each // supported service per user. // -// You can create service-specific credentials for Amazon Bedrock, Amazon -// CloudWatch Logs, CodeCommit and Amazon Keyspaces (for Apache Cassandra). -// // You can reset the password to a new service-generated value by calling [ResetServiceSpecificCredential]. // -// For more information about service-specific credentials, see [Service-specific credentials for IAM users] in the IAM User -// Guide. +// For more information about using service-specific credentials to authenticate +// to an Amazon Web Services service, refer to the following docs: +// +// - For service-specific credentials with CodeCommit, refer to [IAM credentials for CodeCommit: Git credentials, SSH keys, and Amazon Web Services access keys]in the IAM User +// Guide. +// +// - For service-specific credentials with Amazon Keyspaces (for Apache +// Cassandra), refer to [Use IAM with Amazon Keyspaces (for Apache Cassandra)]in the IAM User Guide. +// +// - For services that support long-term API keys, refer to [API keys for Amazon Web Services services]in the IAM User +// Guide. // // [ResetServiceSpecificCredential]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_ResetServiceSpecificCredential.html -// [Service-specific credentials for IAM users]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_bedrock.html +// [IAM credentials for CodeCommit: Git credentials, SSH keys, and Amazon Web Services access keys]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html +// [Use IAM with Amazon Keyspaces (for Apache Cassandra)]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_keyspaces.html +// [API keys for Amazon Web Services services]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_api_keys_for_aws_services.html func (c *Client) CreateServiceSpecificCredential(ctx context.Context, params *CreateServiceSpecificCredentialInput, optFns ...func(*Options)) (*CreateServiceSpecificCredentialOutput, error) { if params == nil { params = &CreateServiceSpecificCredentialInput{} @@ -66,8 +74,13 @@ type CreateServiceSpecificCredentialInput struct { UserName *string // The number of days until the service specific credential expires. This field is - // only valid for Bedrock and CloudWatch Logs API keys and must be a positive + // only valid for services that support long-term API keys and must be a positive // integer. When not specified, the credential will not expire. + // + // To see which services support long-term API keys, refer to [API keys for Amazon Web Services services] in the IAM User + // Guide. + // + // [API keys for Amazon Web Services services]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_api_keys_for_aws_services.html CredentialAgeDays *int32 noSmithyDocumentSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go index d7c8072b5..4516a406c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go @@ -16,9 +16,20 @@ import ( // service-specific credentials returned by this operation are used only for // authenticating the IAM user to a specific service. For more information about // using service-specific credentials to authenticate to an Amazon Web Services -// service, see [Set up service-specific credentials]in the CodeCommit User Guide. +// service, refer to the following docs: // -// [Set up service-specific credentials]: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html +// - For service-specific credentials with CodeCommit, refer to [IAM credentials for CodeCommit: Git credentials, SSH keys, and Amazon Web Services access keys]in the IAM User +// Guide. +// +// - For service-specific credentials with Amazon Keyspaces (for Apache +// Cassandra), refer to [Use IAM with Amazon Keyspaces (for Apache Cassandra)]in the IAM User Guide. +// +// - For services that support long-term API keys, refer to [API keys for Amazon Web Services services]in the IAM User +// Guide. +// +// [IAM credentials for CodeCommit: Git credentials, SSH keys, and Amazon Web Services access keys]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html +// [Use IAM with Amazon Keyspaces (for Apache Cassandra)]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_keyspaces.html +// [API keys for Amazon Web Services services]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_api_keys_for_aws_services.html func (c *Client) ListServiceSpecificCredentials(ctx context.Context, params *ListServiceSpecificCredentialsInput, optFns ...func(*Options)) (*ListServiceSpecificCredentialsOutput, error) { if params == nil { params = &ListServiceSpecificCredentialsInput{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go index cf5e4b11a..b8b89235d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go @@ -3,4 +3,4 @@ package iam // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.54.3" +const goModuleVersion = "1.54.5" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md index c11064625..1b6e1fd07 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.9.22 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.9.21 (2026-06-04) * **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go index c1caeff46..f4054b7e8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go @@ -3,4 +3,4 @@ package checksum // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.9.21" +const goModuleVersion = "1.9.22" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md index 4385cab3d..2a082b44f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.13.29 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.13.28 (2026-06-04) * **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go index f87c4ddb2..84b406a78 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go @@ -3,4 +3,4 @@ package presignedurl // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.28" +const goModuleVersion = "1.13.29" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md index baf507f46..2acbdd52e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.19.29 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.19.28 (2026-06-04) * **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go index 78acdad14..303c37c76 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go @@ -3,4 +3,4 @@ package s3shared // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.19.28" +const goModuleVersion = "1.19.29" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/CHANGELOG.md index 9f65900c8..40eb639e3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/CHANGELOG.md @@ -1,3 +1,24 @@ +# v1.42.7 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.42.6 (2026-06-05.2) + +* **Bug Fix**: Undo the initial wave of schema-serde releases due to several customer-reported regressions. + +# v1.42.5 (2026-06-04) + +* **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.42.4 (2026-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.42.3 (2026-06-02) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.42.2 (2026-05-29) * **Dependency Update**: Update to smithy-go v1.26.0. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/go_module_metadata.go index 4a30ac3d6..193255418 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/go_module_metadata.go @@ -3,4 +3,4 @@ package pricing // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.42.2" +const goModuleVersion = "1.42.7" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md index d033a73d6..09658aa00 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md @@ -1,3 +1,24 @@ +# v1.2.0 (2026-06-10) + +* **Feature**: AWS Sign-In now allows customers to control access to the AWS Management Console using resource-based policies. With this release customers can restrict console access based on network perimeters such as VPC IDs, VPC endpoints, and IP addresses. + +# v1.1.5 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.1.4 (2026-06-04) + +* **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.1.3 (2026-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.1.2 (2026-06-02) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.1.1 (2026-05-29) * **Dependency Update**: Update to smithy-go v1.26.0. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_client.go index 2c0413c16..3c7296775 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_client.go @@ -4,6 +4,7 @@ package signin import ( "context" + cryptorand "crypto/rand" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" @@ -20,6 +21,7 @@ import ( "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net" @@ -201,6 +203,8 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveHTTPSignerV4(&options) + resolveIdempotencyTokenProvider(&options) + resolveEndpointResolverV2(&options) resolveTracerProvider(&options) @@ -709,6 +713,13 @@ func addIsPaginatorUserAgent(o *Options) { }) } +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + func addRetry(stack *middleware.Stack, o Options, c *Client) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -816,6 +827,11 @@ func resolveMeterProvider(options *Options) { } } +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go index dec8656f8..18e25c3ae 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go @@ -8,6 +8,7 @@ import ( awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/service/signin/types" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -84,6 +85,11 @@ type CreateOAuth2TokenInput struct { noSmithyDocumentSerde } +func (in *CreateOAuth2TokenInput) bindEndpointParams(p *EndpointParameters) { + + p.IsControlPlane = ptr.Bool(false) +} + // Output structure for CreateOAuth2Token operation // // Contains flattened token operation outputs for both authorization code and diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteConsoleAuthorizationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteConsoleAuthorizationConfiguration.go new file mode 100644 index 000000000..cf81328ca --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteConsoleAuthorizationConfiguration.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete console authorization configuration with automatic scope detection +func (c *Client) DeleteConsoleAuthorizationConfiguration(ctx context.Context, params *DeleteConsoleAuthorizationConfigurationInput, optFns ...func(*Options)) (*DeleteConsoleAuthorizationConfigurationOutput, error) { + if params == nil { + params = &DeleteConsoleAuthorizationConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteConsoleAuthorizationConfiguration", params, optFns, c.addOperationDeleteConsoleAuthorizationConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteConsoleAuthorizationConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Input for DeleteConsoleAuthorizationConfiguration operation +type DeleteConsoleAuthorizationConfigurationInput struct { + + // Target account identifier + TargetId *string + + noSmithyDocumentSerde +} + +func (in *DeleteConsoleAuthorizationConfigurationInput) bindEndpointParams(p *EndpointParameters) { + + p.IsControlPlane = ptr.Bool(true) +} + +// Output for DeleteConsoleAuthorizationConfiguration operation +type DeleteConsoleAuthorizationConfigurationOutput struct { + + // Whether console authorization is enabled + // + // This member is required. + ConsoleAuthorizationEnabled *bool + + // Authorization scope + // + // This member is required. + Scope *string + + // Target account identifier + // + // This member is required. + TargetId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteConsoleAuthorizationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteConsoleAuthorizationConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteConsoleAuthorizationConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteConsoleAuthorizationConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteConsoleAuthorizationConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteConsoleAuthorizationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteConsoleAuthorizationConfiguration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteResourcePermissionStatement.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteResourcePermissionStatement.go new file mode 100644 index 000000000..b6056c753 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteResourcePermissionStatement.go @@ -0,0 +1,196 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Remove a permission statement from the account's SignIn resource-based policy +func (c *Client) DeleteResourcePermissionStatement(ctx context.Context, params *DeleteResourcePermissionStatementInput, optFns ...func(*Options)) (*DeleteResourcePermissionStatementOutput, error) { + if params == nil { + params = &DeleteResourcePermissionStatementInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePermissionStatement", params, optFns, c.addOperationDeleteResourcePermissionStatementMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResourcePermissionStatementOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Input for DeleteResourcePermissionStatement operation +type DeleteResourcePermissionStatementInput struct { + + // Unique identifier of the permission statement to delete + // + // This member is required. + StatementId *string + + // Idempotency token for the request + ClientToken *string + + noSmithyDocumentSerde +} + +func (in *DeleteResourcePermissionStatementInput) bindEndpointParams(p *EndpointParameters) { + + p.IsControlPlane = ptr.Bool(true) +} + +// Output for DeleteResourcePermissionStatement operation +type DeleteResourcePermissionStatementOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteResourcePermissionStatementMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteResourcePermissionStatement{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteResourcePermissionStatement{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteResourcePermissionStatement"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opDeleteResourcePermissionStatementMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteResourcePermissionStatementValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePermissionStatement(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpDeleteResourcePermissionStatement struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpDeleteResourcePermissionStatement) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpDeleteResourcePermissionStatement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*DeleteResourcePermissionStatementInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteResourcePermissionStatementInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opDeleteResourcePermissionStatementMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteResourcePermissionStatement{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opDeleteResourcePermissionStatement(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteResourcePermissionStatement", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetConsoleAuthorizationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetConsoleAuthorizationConfiguration.go new file mode 100644 index 000000000..27b48843b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetConsoleAuthorizationConfiguration.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get console authorization configuration with automatic scope detection +func (c *Client) GetConsoleAuthorizationConfiguration(ctx context.Context, params *GetConsoleAuthorizationConfigurationInput, optFns ...func(*Options)) (*GetConsoleAuthorizationConfigurationOutput, error) { + if params == nil { + params = &GetConsoleAuthorizationConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetConsoleAuthorizationConfiguration", params, optFns, c.addOperationGetConsoleAuthorizationConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetConsoleAuthorizationConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Input for GetConsoleAuthorizationConfiguration operation +type GetConsoleAuthorizationConfigurationInput struct { + + // Target account identifier + TargetId *string + + noSmithyDocumentSerde +} + +func (in *GetConsoleAuthorizationConfigurationInput) bindEndpointParams(p *EndpointParameters) { + + p.IsControlPlane = ptr.Bool(true) +} + +// Output for GetConsoleAuthorizationConfiguration operation +type GetConsoleAuthorizationConfigurationOutput struct { + + // Whether console authorization is enabled + // + // This member is required. + ConsoleAuthorizationEnabled *bool + + // Authorization scope + // + // This member is required. + Scope *string + + // Target account identifier + // + // This member is required. + TargetId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetConsoleAuthorizationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetConsoleAuthorizationConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetConsoleAuthorizationConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetConsoleAuthorizationConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConsoleAuthorizationConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetConsoleAuthorizationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetConsoleAuthorizationConfiguration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetResourcePolicy.go new file mode 100644 index 000000000..0326dce11 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetResourcePolicy.go @@ -0,0 +1,155 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/signin/types" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieve the account's consolidated SignIn resource-based policy +func (c *Client) GetResourcePolicy(ctx context.Context, params *GetResourcePolicyInput, optFns ...func(*Options)) (*GetResourcePolicyOutput, error) { + if params == nil { + params = &GetResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResourcePolicy", params, optFns, c.addOperationGetResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Input for GetResourcePolicy operation +type GetResourcePolicyInput struct { + noSmithyDocumentSerde +} + +func (in *GetResourcePolicyInput) bindEndpointParams(p *EndpointParameters) { + + p.IsControlPlane = ptr.Bool(true) +} + +// Output for GetResourcePolicy operation +type GetResourcePolicyOutput struct { + + // The account's SignIn resource-based policy + // + // This member is required. + SigninResourceBasedPolicy *types.SigninResourceBasedPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetResourcePolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetResourcePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListResourcePermissionStatements.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListResourcePermissionStatements.go new file mode 100644 index 000000000..631885c60 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListResourcePermissionStatements.go @@ -0,0 +1,261 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/signin/types" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieve all permission statements in the account's SignIn resource-based policy +func (c *Client) ListResourcePermissionStatements(ctx context.Context, params *ListResourcePermissionStatementsInput, optFns ...func(*Options)) (*ListResourcePermissionStatementsOutput, error) { + if params == nil { + params = &ListResourcePermissionStatementsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListResourcePermissionStatements", params, optFns, c.addOperationListResourcePermissionStatementsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListResourcePermissionStatementsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Input for ListResourcePermissionStatements operation +type ListResourcePermissionStatementsInput struct { + + // Maximum number of results to return + MaxResults *int32 + + // Token for pagination + NextToken *string + + noSmithyDocumentSerde +} + +func (in *ListResourcePermissionStatementsInput) bindEndpointParams(p *EndpointParameters) { + + p.IsControlPlane = ptr.Bool(true) +} + +// Output for ListResourcePermissionStatements operation +type ListResourcePermissionStatementsOutput struct { + + // List of permission statement summaries + // + // This member is required. + PermissionStatements []types.PermissionStatementSummary + + // Token for next page of results + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListResourcePermissionStatementsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListResourcePermissionStatements{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListResourcePermissionStatements{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListResourcePermissionStatements"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourcePermissionStatements(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListResourcePermissionStatementsPaginatorOptions is the paginator options for +// ListResourcePermissionStatements +type ListResourcePermissionStatementsPaginatorOptions struct { + // Maximum number of results to return + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListResourcePermissionStatementsPaginator is a paginator for +// ListResourcePermissionStatements +type ListResourcePermissionStatementsPaginator struct { + options ListResourcePermissionStatementsPaginatorOptions + client ListResourcePermissionStatementsAPIClient + params *ListResourcePermissionStatementsInput + nextToken *string + firstPage bool +} + +// NewListResourcePermissionStatementsPaginator returns a new +// ListResourcePermissionStatementsPaginator +func NewListResourcePermissionStatementsPaginator(client ListResourcePermissionStatementsAPIClient, params *ListResourcePermissionStatementsInput, optFns ...func(*ListResourcePermissionStatementsPaginatorOptions)) *ListResourcePermissionStatementsPaginator { + if params == nil { + params = &ListResourcePermissionStatementsInput{} + } + + options := ListResourcePermissionStatementsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListResourcePermissionStatementsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListResourcePermissionStatementsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListResourcePermissionStatements page. +func (p *ListResourcePermissionStatementsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourcePermissionStatementsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListResourcePermissionStatements(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListResourcePermissionStatementsAPIClient is a client that implements the +// ListResourcePermissionStatements operation. +type ListResourcePermissionStatementsAPIClient interface { + ListResourcePermissionStatements(context.Context, *ListResourcePermissionStatementsInput, ...func(*Options)) (*ListResourcePermissionStatementsOutput, error) +} + +var _ ListResourcePermissionStatementsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListResourcePermissionStatements(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListResourcePermissionStatements", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutConsoleAuthorizationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutConsoleAuthorizationConfiguration.go new file mode 100644 index 000000000..5cbddac14 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutConsoleAuthorizationConfiguration.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Enable console authorization configuration with automatic scope detection +func (c *Client) PutConsoleAuthorizationConfiguration(ctx context.Context, params *PutConsoleAuthorizationConfigurationInput, optFns ...func(*Options)) (*PutConsoleAuthorizationConfigurationOutput, error) { + if params == nil { + params = &PutConsoleAuthorizationConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutConsoleAuthorizationConfiguration", params, optFns, c.addOperationPutConsoleAuthorizationConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutConsoleAuthorizationConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Input for PutConsoleAuthorizationConfiguration operation +type PutConsoleAuthorizationConfigurationInput struct { + + // Target account identifier + TargetId *string + + noSmithyDocumentSerde +} + +func (in *PutConsoleAuthorizationConfigurationInput) bindEndpointParams(p *EndpointParameters) { + + p.IsControlPlane = ptr.Bool(true) +} + +// Output for PutConsoleAuthorizationConfiguration operation +type PutConsoleAuthorizationConfigurationOutput struct { + + // Whether console authorization is enabled + // + // This member is required. + ConsoleAuthorizationEnabled *bool + + // Authorization scope + // + // This member is required. + Scope *string + + // Target account identifier + // + // This member is required. + TargetId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutConsoleAuthorizationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutConsoleAuthorizationConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutConsoleAuthorizationConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutConsoleAuthorizationConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutConsoleAuthorizationConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutConsoleAuthorizationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutConsoleAuthorizationConfiguration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutResourcePermissionStatement.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutResourcePermissionStatement.go new file mode 100644 index 000000000..4d5a81444 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutResourcePermissionStatement.go @@ -0,0 +1,216 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create a permission statement in the account's SignIn resource-based policy +func (c *Client) PutResourcePermissionStatement(ctx context.Context, params *PutResourcePermissionStatementInput, optFns ...func(*Options)) (*PutResourcePermissionStatementOutput, error) { + if params == nil { + params = &PutResourcePermissionStatementInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutResourcePermissionStatement", params, optFns, c.addOperationPutResourcePermissionStatementMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutResourcePermissionStatementOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Input for PutResourcePermissionStatement operation +type PutResourcePermissionStatementInput struct { + + // Idempotency token for the request + ClientToken *string + + // Console VPC endpoint identifier + ConsoleSourceVpce *string + + // Principal to exclude from the permission statement + ExcludedPrincipal *string + + // AWS region where the VPC and VPC endpoint reside Required when sourceVpc or + // signinSourceVpce/consoleSourceVpce is provided + RequestedRegion *string + + // SignIn VPC endpoint identifier + SigninSourceVpce *string + + // Source IP address + SourceIp *string + + // VPC identifier to restrict console access + SourceVpc *string + + // Source IP address within VPC + VpcSourceIp *string + + noSmithyDocumentSerde +} + +func (in *PutResourcePermissionStatementInput) bindEndpointParams(p *EndpointParameters) { + + p.IsControlPlane = ptr.Bool(true) +} + +// Output for PutResourcePermissionStatement operation +type PutResourcePermissionStatementOutput struct { + + // Unique identifier for the created permission statement + // + // This member is required. + StatementId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutResourcePermissionStatementMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutResourcePermissionStatement{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutResourcePermissionStatement{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutResourcePermissionStatement"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opPutResourcePermissionStatementMiddleware(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePermissionStatement(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpPutResourcePermissionStatement struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpPutResourcePermissionStatement) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpPutResourcePermissionStatement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*PutResourcePermissionStatementInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *PutResourcePermissionStatementInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opPutResourcePermissionStatementMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpPutResourcePermissionStatement{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opPutResourcePermissionStatement(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutResourcePermissionStatement", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/deserializers.go index b74b612e6..12208eaaf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/deserializers.go @@ -180,12 +180,41 @@ func awsRestjson1_deserializeOpDocumentCreateOAuth2TokenOutput(v **CreateOAuth2T return nil } -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} +type awsRestjson1_deserializeOpDeleteConsoleAuthorizationConfiguration struct { +} + +func (*awsRestjson1_deserializeOpDeleteConsoleAuthorizationConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteConsoleAuthorizationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteConsoleAuthorizationConfiguration(response, &metadata) + } + output := &DeleteConsoleAuthorizationConfigurationOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -196,36 +225,46 @@ func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentDeleteConsoleAuthorizationConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + span.End() + return out, metadata, err } -func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServerException{} +func awsRestjson1_deserializeOpErrorDeleteConsoleAuthorizationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -235,8 +274,154 @@ func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.R return err } - err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsError", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsError(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteConsoleAuthorizationConfigurationOutput(v **DeleteConsoleAuthorizationConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteConsoleAuthorizationConfigurationOutput + if *v == nil { + sv = &DeleteConsoleAuthorizationConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "consoleAuthorizationEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ConsoleAuthorizationEnabled = ptr.Bool(jtv) + } + + case "scope": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Scope = ptr.String(jtv) + } + + case "targetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetId to be of type string, got %T instead", value) + } + sv.TargetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteResourcePermissionStatement struct { +} + +func (*awsRestjson1_deserializeOpDeleteResourcePermissionStatement) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteResourcePermissionStatement) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteResourcePermissionStatement(response, &metadata) + } + output := &DeleteResourcePermissionStatementOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteResourcePermissionStatement(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -248,16 +433,74 @@ func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.R } errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - return output + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsError", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsError(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -func awsRestjson1_deserializeErrorTooManyRequestsError(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyRequestsError{} +type awsRestjson1_deserializeOpGetConsoleAuthorizationConfiguration struct { +} + +func (*awsRestjson1_deserializeOpGetConsoleAuthorizationConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetConsoleAuthorizationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetConsoleAuthorizationConfiguration(response, &metadata) + } + output := &GetConsoleAuthorizationConfigurationOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -268,15 +511,49 @@ func awsRestjson1_deserializeErrorTooManyRequestsError(response *smithyhttp.Resp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentTooManyRequestsError(&output, shape) - + err = awsRestjson1_deserializeOpDocumentGetConsoleAuthorizationConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetConsoleAuthorizationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } @@ -284,20 +561,182 @@ func awsRestjson1_deserializeErrorTooManyRequestsError(response *smithyhttp.Resp } errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - return output + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsError", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsError(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ValidationException{} +func awsRestjson1_deserializeOpDocumentGetConsoleAuthorizationConfigurationOutput(v **GetConsoleAuthorizationConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetConsoleAuthorizationConfigurationOutput + if *v == nil { + sv = &GetConsoleAuthorizationConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "consoleAuthorizationEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ConsoleAuthorizationEnabled = ptr.Bool(jtv) + } + + case "scope": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Scope = ptr.String(jtv) + } + + case "targetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetId to be of type string, got %T instead", value) + } + sv.TargetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetResourcePolicy struct { +} + +func (*awsRestjson1_deserializeOpGetResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetResourcePolicy(response, &metadata) + } + output := &GetResourcePolicyOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetResourcePolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -307,24 +746,1195 @@ func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Respo return err } - err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsError", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetResourcePolicyOutput(v **GetResourcePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetResourcePolicyOutput + if *v == nil { + sv = &GetResourcePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "signinResourceBasedPolicy": + if err := awsRestjson1_deserializeDocumentSigninResourceBasedPolicy(&sv.SigninResourceBasedPolicy, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListResourcePermissionStatements struct { +} + +func (*awsRestjson1_deserializeOpListResourcePermissionStatements) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListResourcePermissionStatements) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListResourcePermissionStatements(response, &metadata) + } + output := &ListResourcePermissionStatementsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListResourcePermissionStatementsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListResourcePermissionStatements(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsError", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsError(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListResourcePermissionStatementsOutput(v **ListResourcePermissionStatementsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListResourcePermissionStatementsOutput + if *v == nil { + sv = &ListResourcePermissionStatementsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "permissionStatements": + if err := awsRestjson1_deserializeDocumentPermissionStatementSummaries(&sv.PermissionStatements, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutConsoleAuthorizationConfiguration struct { +} + +func (*awsRestjson1_deserializeOpPutConsoleAuthorizationConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutConsoleAuthorizationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPutConsoleAuthorizationConfiguration(response, &metadata) + } + output := &PutConsoleAuthorizationConfigurationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentPutConsoleAuthorizationConfigurationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutConsoleAuthorizationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsError", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsError(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutConsoleAuthorizationConfigurationOutput(v **PutConsoleAuthorizationConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutConsoleAuthorizationConfigurationOutput + if *v == nil { + sv = &PutConsoleAuthorizationConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "consoleAuthorizationEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ConsoleAuthorizationEnabled = ptr.Bool(jtv) + } + + case "scope": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Scope = ptr.String(jtv) + } + + case "targetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetId to be of type string, got %T instead", value) + } + sv.TargetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutResourcePermissionStatement struct { +} + +func (*awsRestjson1_deserializeOpPutResourcePermissionStatement) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutResourcePermissionStatement) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPutResourcePermissionStatement(response, &metadata) + } + output := &PutResourcePermissionStatementOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentPutResourcePermissionStatementOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutResourcePermissionStatement(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("TooManyRequestsError", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsError(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutResourcePermissionStatementOutput(v **PutResourcePermissionStatementOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutResourcePermissionStatementOutput + if *v == nil { + sv = &PutResourcePermissionStatementOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "statementId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatementId to be of type string, got %T instead", value) + } + sv.StatementId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceQuotaExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorTooManyRequestsError(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyRequestsError{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentTooManyRequestsError(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "error": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OAuth2ErrorCode to be of type string, got %T instead", value) + } + sv.Error_ = types.OAuth2ErrorCode(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccessToken(v **types.AccessToken, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessToken + if *v == nil { + sv = &types.AccessToken{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AccessKeyId = ptr.String(jtv) + } + + case "secretAccessKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SecretAccessKey = ptr.String(jtv) + } + + case "sessionToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SessionToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCondition(v *map[string][]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string][]string + if *v == nil { + mv = map[string][]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal []string + mapVar := parsedVal + if err := awsRestjson1_deserializeDocumentConditionValues(&mapVar, value); err != nil { + return err + } + parsedVal = mapVar + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentConditionBlock(v *map[string]map[string][]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]map[string][]string + if *v == nil { + mv = map[string]map[string][]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal map[string][]string + mapVar := parsedVal + if err := awsRestjson1_deserializeDocumentCondition(&mapVar, value); err != nil { + return err + } + parsedVal = mapVar + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentConditionValues(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "error": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OAuth2ErrorCode to be of type string, got %T instead", value) + } + sv.Error_ = types.OAuth2ErrorCode(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCreateOAuth2TokenResponseBody(v **types.CreateOAuth2TokenResponseBody, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CreateOAuth2TokenResponseBody + if *v == nil { + sv = &types.CreateOAuth2TokenResponseBody{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessToken": + if err := awsRestjson1_deserializeDocumentAccessToken(&sv.AccessToken, value); err != nil { + return err + } + + case "expiresIn": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ExpiresIn to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExpiresIn = ptr.Int32(int32(i64)) + } + + case "idToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdToken to be of type string, got %T instead", value) + } + sv.IdToken = ptr.String(jtv) + } + + case "refreshToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RefreshToken to be of type string, got %T instead", value) + } + sv.RefreshToken = ptr.String(jtv) + } + + case "tokenType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TokenType to be of type string, got %T instead", value) + } + sv.TokenType = ptr.String(jtv) + } + + default: + _, _ = key, value - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), } - return err } - - errorBody.Seek(0, io.SeekStart) - - return output + *v = sv + return nil } -func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -337,9 +1947,9 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var sv *types.InternalServerException if *v == nil { - sv = &types.AccessDeniedException{} + sv = &types.InternalServerException{} } else { sv = *v } @@ -373,7 +1983,41 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } -func awsRestjson1_deserializeDocumentAccessToken(v **types.AccessToken, value interface{}) error { +func awsRestjson1_deserializeDocumentPermissionStatementSummaries(v *[]types.PermissionStatementSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PermissionStatementSummary + if *v == nil { + cv = []types.PermissionStatementSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PermissionStatementSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentPermissionStatementSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPermissionStatementSummary(v **types.PermissionStatementSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -386,40 +2030,27 @@ func awsRestjson1_deserializeDocumentAccessToken(v **types.AccessToken, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessToken + var sv *types.PermissionStatementSummary if *v == nil { - sv = &types.AccessToken{} + sv = &types.PermissionStatementSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "accessKeyId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.AccessKeyId = ptr.String(jtv) - } - - case "secretAccessKey": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.SecretAccessKey = ptr.String(jtv) + case "condition": + if err := awsRestjson1_deserializeDocumentConditionBlock(&sv.Condition, value); err != nil { + return err } - case "sessionToken": + case "sid": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected StatementId to be of type string, got %T instead", value) } - sv.SessionToken = ptr.String(jtv) + sv.Sid = ptr.String(jtv) } default: @@ -431,7 +2062,43 @@ func awsRestjson1_deserializeDocumentAccessToken(v **types.AccessToken, value in return nil } -func awsRestjson1_deserializeDocumentCreateOAuth2TokenResponseBody(v **types.CreateOAuth2TokenResponseBody, value interface{}) error { +func awsRestjson1_deserializeDocumentPolicyActions(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPolicyStatement(v **types.PolicyStatement, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -444,58 +2111,165 @@ func awsRestjson1_deserializeDocumentCreateOAuth2TokenResponseBody(v **types.Cre return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CreateOAuth2TokenResponseBody + var sv *types.PolicyStatement if *v == nil { - sv = &types.CreateOAuth2TokenResponseBody{} + sv = &types.PolicyStatement{} } else { sv = *v } for key, value := range shape { switch key { - case "accessToken": - if err := awsRestjson1_deserializeDocumentAccessToken(&sv.AccessToken, value); err != nil { + case "Action": + if err := awsRestjson1_deserializeDocumentPolicyActions(&sv.Action, value); err != nil { return err } - case "expiresIn": + case "Condition": + if err := awsRestjson1_deserializeDocumentConditionBlock(&sv.Condition, value); err != nil { + return err + } + + case "Effect": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ExpiresIn to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ExpiresIn = ptr.Int32(int32(i64)) + sv.Effect = ptr.String(jtv) } - case "idToken": + case "Principal": + if err := awsRestjson1_deserializeDocumentPrincipal(&sv.Principal, value); err != nil { + return err + } + + case "Resource": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IdToken to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.IdToken = ptr.String(jtv) + sv.Resource = ptr.String(jtv) } - case "refreshToken": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPolicyStatements(v *[]types.PolicyStatement, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PolicyStatement + if *v == nil { + cv = []types.PolicyStatement{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PolicyStatement + destAddr := &col + if err := awsRestjson1_deserializeDocumentPolicyStatement(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPrincipal(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "error": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RefreshToken to be of type string, got %T instead", value) + return fmt.Errorf("expected OAuth2ErrorCode to be of type string, got %T instead", value) } - sv.RefreshToken = ptr.String(jtv) + sv.Error_ = types.OAuth2ErrorCode(jtv) } - case "tokenType": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TokenType to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.TokenType = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -507,7 +2281,7 @@ func awsRestjson1_deserializeDocumentCreateOAuth2TokenResponseBody(v **types.Cre return nil } -func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { +func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -520,9 +2294,9 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InternalServerException + var sv *types.ServiceQuotaExceededException if *v == nil { - sv = &types.InternalServerException{} + sv = &types.ServiceQuotaExceededException{} } else { sv = *v } @@ -556,6 +2330,51 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsRestjson1_deserializeDocumentSigninResourceBasedPolicy(v **types.SigninResourceBasedPolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SigninResourceBasedPolicy + if *v == nil { + sv = &types.SigninResourceBasedPolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Statement": + if err := awsRestjson1_deserializeDocumentPolicyStatements(&sv.Statement, value); err != nil { + return err + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentTooManyRequestsError(v **types.TooManyRequestsError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/endpoints.go index 639250128..169446326 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/endpoints.go @@ -12,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go-v2/internal/endpoints" "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" internalendpoints "github.com/aws/aws-sdk-go-v2/service/signin/internal/endpoints" + smithy "github.com/aws/smithy-go" smithyauth "github.com/aws/smithy-go/auth" smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/endpoints/private/bdd" @@ -269,6 +270,12 @@ type EndpointParameters struct { // // AWS::Region Region *string + + // Indicates if the operation targets the control plane endpoint + // + // Parameter is + // required. + IsControlPlane *bool } // ValidateRequired validates required parameters are set. @@ -299,8 +306,8 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { const bddRoot int32 = 2 -var bddNodes = [48]int32{ - -1, 1, -1, 0, 15, 3, 1, 4, 100000014, 2, 5, 100000014, 3, 11, 6, 4, 10, 7, 7, 100000004, 8, 8, 100000005, 9, 9, 100000006, 100000013, 5, 100000011, 100000012, 4, 13, 12, 6, 100000009, 100000010, 5, 14, 100000008, 6, 100000007, 100000008, 3, 100000001, 16, 4, 100000002, 100000003} +var bddNodes = [99]int32{ + -1, 1, -1, 0, 4, 3, 2, 30, 100000025, 1, 24, 5, 2, 30, 6, 3, 7, 26, 4, 18, 8, 5, 17, 9, 6, 100000004, 10, 7, 100000005, 11, 10, 100000006, 12, 12, 100000007, 13, 13, 100000008, 14, 14, 100000009, 15, 15, 100000010, 16, 16, 100000011, 100000014, 8, 100000022, 100000023, 5, 22, 19, 9, 100000012, 20, 10, 100000013, 21, 11, 100000020, 100000021, 8, 23, 100000019, 11, 100000018, 100000019, 2, 29, 25, 3, 32, 26, 4, 27, 100000025, 5, 100000025, 28, 9, 100000012, 100000025, 3, 32, 30, 4, 100000015, 31, 5, 100000016, 100000017, 6, 100000001, 33, 7, 100000002, 100000003} type conditionContext struct { PartitionResult *awsrulesfn.PartitionConfig @@ -309,29 +316,48 @@ type conditionContext struct { func evalCondition(idx int, params *EndpointParameters, c *conditionContext) bool { switch idx { case 0: - return params.Endpoint != nil - case 1: return params.Region != nil + case 1: + return func() bool { + if v := params.IsControlPlane; v != nil { + return *v + } + return false + }() == true case 2: + return params.Endpoint != nil + case 3: if v := awsrulesfn.GetPartition(*params.Region); v != nil { c.PartitionResult = v return true } return false - case 3: - return *params.UseFIPS == true case 4: - return *params.UseDualStack == true + return *params.UseFIPS == true case 5: - return c.PartitionResult.SupportsDualStack == true + return *params.UseDualStack == true case 6: - return c.PartitionResult.SupportsFIPS == true - case 7: return c.PartitionResult.Name == "aws" - case 8: + case 7: return c.PartitionResult.Name == "aws-cn" + case 8: + return c.PartitionResult.SupportsDualStack == true case 9: + return *params.Region == "us-gov-west-1" + case 10: return c.PartitionResult.Name == "aws-us-gov" + case 11: + return c.PartitionResult.SupportsFIPS == true + case 12: + return c.PartitionResult.Name == "aws-iso" + case 13: + return c.PartitionResult.Name == "aws-iso-b" + case 14: + return c.PartitionResult.Name == "aws-iso-f" + case 15: + return c.PartitionResult.Name == "aws-iso-e" + case 16: + return c.PartitionResult.Name == "aws-eusc" } return false } @@ -341,11 +367,80 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) ( case 0: return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint resolution failed: no matching rule") case 1: - return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") + uriString := func() string { + var out strings.Builder + out.WriteString("https://signin.") + out.WriteString(*params.Region) + out.WriteString(".api.aws") + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "signin") + smithyhttp.SetSigV4ASigningName(&sp, "signin") + + smithyhttp.SetSigV4SigningRegion(&sp, *params.Region) + return sp + }(), + }, + }) + return out + }(), + }, nil case 2: - return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") + uriString := func() string { + var out strings.Builder + out.WriteString("https://signin.") + out.WriteString(*params.Region) + out.WriteString(".api.amazonwebservices.com.cn") + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "signin") + smithyhttp.SetSigV4ASigningName(&sp, "signin") + + smithyhttp.SetSigV4SigningRegion(&sp, *params.Region) + return sp + }(), + }, + }) + return out + }(), + }, nil case 3: - uriString := *params.Endpoint + uriString := func() string { + var out strings.Builder + out.WriteString("https://signin.") + out.WriteString(*params.Region) + out.WriteString(".") + out.WriteString(c.PartitionResult.DualStackDnsSuffix) + return out.String() + }() uri, err := url.Parse(uriString) if err != nil { return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) @@ -353,6 +448,23 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) ( return smithyendpoints.Endpoint{ URI: *uri, Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "signin") + smithyhttp.SetSigV4ASigningName(&sp, "signin") + + smithyhttp.SetSigV4SigningRegion(&sp, *params.Region) + return sp + }(), + }, + }) + return out + }(), }, nil case 4: uriString := func() string { @@ -403,6 +515,143 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) ( Headers: http.Header{}, }, nil case 7: + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(*params.Region) + out.WriteString(".signin.c2shome.ic.gov") + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 8: + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(*params.Region) + out.WriteString(".signin.sc2shome.sgov.gov") + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 9: + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(*params.Region) + out.WriteString(".signin.csphome.hci.ic.gov") + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 10: + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(*params.Region) + out.WriteString(".signin.csphome.adc-e.uk") + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 11: + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(*params.Region) + out.WriteString(".signin.amazonaws-eusc.eu") + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 12: + uriString := "https://signin-fips.amazonaws-us-gov.com" + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 13: + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(*params.Region) + out.WriteString(".signin-fips.amazonaws-us-gov.com") + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 14: + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(*params.Region) + out.WriteString(".signin.") + out.WriteString(c.PartitionResult.DnsSuffix) + return out.String() + }() + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 15: + return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") + case 16: + return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") + case 17: + uriString := *params.Endpoint + uri, err := url.Parse(uriString) + if err != nil { + return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString) + } + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + case 18: uriString := func() string { var out strings.Builder out.WriteString("https://signin-fips.") @@ -419,9 +668,9 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) ( URI: *uri, Headers: http.Header{}, }, nil - case 8: + case 19: return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - case 9: + case 20: uriString := func() string { var out strings.Builder out.WriteString("https://signin-fips.") @@ -438,9 +687,9 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) ( URI: *uri, Headers: http.Header{}, }, nil - case 10: + case 21: return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") - case 11: + case 22: uriString := func() string { var out strings.Builder out.WriteString("https://signin.") @@ -457,9 +706,9 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) ( URI: *uri, Headers: http.Header{}, }, nil - case 12: + case 23: return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") - case 13: + case 24: uriString := func() string { var out strings.Builder out.WriteString("https://signin.") @@ -476,7 +725,7 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) ( URI: *uri, Headers: http.Header{}, }, nil - case 14: + case 25: return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") } return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, invalid result index: %d", idx) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/generated.json index 6043ab63f..4965af441 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/generated.json @@ -9,6 +9,13 @@ "api_client.go", "api_client_test.go", "api_op_CreateOAuth2Token.go", + "api_op_DeleteConsoleAuthorizationConfiguration.go", + "api_op_DeleteResourcePermissionStatement.go", + "api_op_GetConsoleAuthorizationConfiguration.go", + "api_op_GetResourcePolicy.go", + "api_op_ListResourcePermissionStatements.go", + "api_op_PutConsoleAuthorizationConfiguration.go", + "api_op_PutResourcePermissionStatement.go", "auth.go", "deserializers.go", "doc.go", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go index b4964612f..ca6d7d6ff 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go @@ -3,4 +3,4 @@ package signin // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.1.1" +const goModuleVersion = "1.2.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/options.go index 88559705f..551d20c28 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/options.go @@ -64,6 +64,10 @@ type Options struct { // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + // The logger writer interface to write logging messages to. Logger logging.Logger diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/serializers.go index 958240275..fe87e71f8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/serializers.go @@ -97,6 +97,595 @@ func awsRestjson1_serializeOpHttpBindingsCreateOAuth2TokenInput(v *CreateOAuth2T return nil } +type awsRestjson1_serializeOpDeleteConsoleAuthorizationConfiguration struct { +} + +func (*awsRestjson1_serializeOpDeleteConsoleAuthorizationConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteConsoleAuthorizationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteConsoleAuthorizationConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/delete-console-authorization-configuration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDeleteConsoleAuthorizationConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteConsoleAuthorizationConfigurationInput(v *DeleteConsoleAuthorizationConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteConsoleAuthorizationConfigurationInput(v *DeleteConsoleAuthorizationConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TargetId != nil { + ok := object.Key("targetId") + ok.String(*v.TargetId) + } + + return nil +} + +type awsRestjson1_serializeOpDeleteResourcePermissionStatement struct { +} + +func (*awsRestjson1_serializeOpDeleteResourcePermissionStatement) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteResourcePermissionStatement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteResourcePermissionStatementInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/delete-resource-permission-statement") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDeleteResourcePermissionStatementInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteResourcePermissionStatementInput(v *DeleteResourcePermissionStatementInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteResourcePermissionStatementInput(v *DeleteResourcePermissionStatementInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.StatementId != nil { + ok := object.Key("statementId") + ok.String(*v.StatementId) + } + + return nil +} + +type awsRestjson1_serializeOpGetConsoleAuthorizationConfiguration struct { +} + +func (*awsRestjson1_serializeOpGetConsoleAuthorizationConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetConsoleAuthorizationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetConsoleAuthorizationConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/get-console-authorization-configuration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetConsoleAuthorizationConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetConsoleAuthorizationConfigurationInput(v *GetConsoleAuthorizationConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetConsoleAuthorizationConfigurationInput(v *GetConsoleAuthorizationConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TargetId != nil { + ok := object.Key("targetId") + ok.String(*v.TargetId) + } + + return nil +} + +type awsRestjson1_serializeOpGetResourcePolicy struct { +} + +func (*awsRestjson1_serializeOpGetResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/get-resource-policy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetResourcePolicyInput(v *GetResourcePolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestjson1_serializeOpListResourcePermissionStatements struct { +} + +func (*awsRestjson1_serializeOpListResourcePermissionStatements) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListResourcePermissionStatements) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListResourcePermissionStatementsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/list-resource-permission-statements") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListResourcePermissionStatementsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListResourcePermissionStatementsInput(v *ListResourcePermissionStatementsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListResourcePermissionStatementsInput(v *ListResourcePermissionStatementsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpPutConsoleAuthorizationConfiguration struct { +} + +func (*awsRestjson1_serializeOpPutConsoleAuthorizationConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutConsoleAuthorizationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutConsoleAuthorizationConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/put-console-authorization-configuration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutConsoleAuthorizationConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutConsoleAuthorizationConfigurationInput(v *PutConsoleAuthorizationConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutConsoleAuthorizationConfigurationInput(v *PutConsoleAuthorizationConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TargetId != nil { + ok := object.Key("targetId") + ok.String(*v.TargetId) + } + + return nil +} + +type awsRestjson1_serializeOpPutResourcePermissionStatement struct { +} + +func (*awsRestjson1_serializeOpPutResourcePermissionStatement) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutResourcePermissionStatement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutResourcePermissionStatementInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/put-resource-permission-statement") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutResourcePermissionStatementInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutResourcePermissionStatementInput(v *PutResourcePermissionStatementInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutResourcePermissionStatementInput(v *PutResourcePermissionStatementInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.ConsoleSourceVpce != nil { + ok := object.Key("consoleSourceVpce") + ok.String(*v.ConsoleSourceVpce) + } + + if v.ExcludedPrincipal != nil { + ok := object.Key("excludedPrincipal") + ok.String(*v.ExcludedPrincipal) + } + + if v.RequestedRegion != nil { + ok := object.Key("requestedRegion") + ok.String(*v.RequestedRegion) + } + + if v.SigninSourceVpce != nil { + ok := object.Key("signinSourceVpce") + ok.String(*v.SigninSourceVpce) + } + + if v.SourceIp != nil { + ok := object.Key("sourceIp") + ok.String(*v.SourceIp) + } + + if v.SourceVpc != nil { + ok := object.Key("sourceVpc") + ok.String(*v.SourceVpc) + } + + if v.VpcSourceIp != nil { + ok := object.Key("vpcSourceIp") + ok.String(*v.VpcSourceIp) + } + + return nil +} + func awsRestjson1_serializeDocumentCreateOAuth2TokenRequestBody(v *types.CreateOAuth2TokenRequestBody, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/enums.go index ecfabb81f..2ab46c8f2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/enums.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/enums.go @@ -19,6 +19,12 @@ const ( // The request is missing a required parameter, includes an invalid parameter // value, or is otherwise malformed OAuth2ErrorCodeInvalidRequest OAuth2ErrorCode = "INVALID_REQUEST" + // Requested resource was not found + OAuth2ErrorCodeResourceNotFound OAuth2ErrorCode = "RESOURCE_NOT_FOUND" + // Request conflicts with current state of the resource + OAuth2ErrorCodeConflict OAuth2ErrorCode = "CONFLICT" + // Request would cause a service quota to be exceeded + OAuth2ErrorCodeServiceQuotaExceeded OAuth2ErrorCode = "SERVICE_QUOTA_EXCEEDED" ) // Values returns all known values for OAuth2ErrorCode. Note that this can be @@ -33,5 +39,8 @@ func (OAuth2ErrorCode) Values() []OAuth2ErrorCode { "AUTHCODE_EXPIRED", "server_error", "INVALID_REQUEST", + "RESOURCE_NOT_FOUND", + "CONFLICT", + "SERVICE_QUOTA_EXCEEDED", } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/errors.go index ca4928a86..56e1019b0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/errors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/errors.go @@ -44,6 +44,38 @@ func (e *AccessDeniedException) ErrorCode() string { } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// Error thrown when request conflicts with current state +// +// HTTP Status Code: 409 Conflict +// +// Used when the request conflicts with the current state of the resource +type ConflictException struct { + Message *string + + ErrorCodeOverride *string + + Error_ OAuth2ErrorCode + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConflictException" + } + return *e.ErrorCodeOverride +} +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Error thrown when an internal server error occurs // // HTTP Status Code: 500 Internal Server Error @@ -76,6 +108,70 @@ func (e *InternalServerException) ErrorCode() string { } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } +// Error thrown when requested resource is not found +// +// HTTP Status Code: 404 Not Found +// +// Used when the specified resource does not exist +type ResourceNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + Error_ OAuth2ErrorCode + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Error thrown when service quota is exceeded +// +// HTTP Status Code: 402 Payment Required (used as quota exceeded indicator) +// +// Used when the request would cause a service quota to be exceeded +type ServiceQuotaExceededException struct { + Message *string + + ErrorCodeOverride *string + + Error_ OAuth2ErrorCode + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ServiceQuotaExceededException" + } + return *e.ErrorCodeOverride +} +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Error thrown when rate limit is exceeded // // HTTP Status Code: 429 Too Many Requests diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/types.go index 98afa20bf..aa4f7ecbe 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/types.go @@ -112,4 +112,51 @@ type CreateOAuth2TokenResponseBody struct { noSmithyDocumentSerde } +// Summary of a permission statement +type PermissionStatementSummary struct { + + // Unique identifier for the permission statement + // + // This member is required. + Sid *string + + // Condition block for the permission statement + Condition map[string]map[string][]string + + noSmithyDocumentSerde +} + +// Individual policy statement within a resource-based policy +type PolicyStatement struct { + + // Actions the statement controls + Action []string + + // Condition block for the statement + Condition map[string]map[string][]string + + // Effect of the policy statement (Allow/Deny) + Effect *string + + // Principal the statement applies to + Principal map[string]string + + // Resource the statement applies to + Resource *string + + noSmithyDocumentSerde +} + +// SignIn resource-based policy document +type SigninResourceBasedPolicy struct { + + // Policy statements + Statement []PolicyStatement + + // Policy version + Version *string + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/validators.go index f07252341..8570cc5db 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/validators.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/validators.go @@ -30,10 +30,34 @@ func (m *validateOpCreateOAuth2Token) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpDeleteResourcePermissionStatement struct { +} + +func (*validateOpDeleteResourcePermissionStatement) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteResourcePermissionStatement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteResourcePermissionStatementInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteResourcePermissionStatementInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + func addOpCreateOAuth2TokenValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateOAuth2Token{}, middleware.After) } +func addOpDeleteResourcePermissionStatementValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteResourcePermissionStatement{}, middleware.After) +} + func validateCreateOAuth2TokenRequestBody(v *types.CreateOAuth2TokenRequestBody) error { if v == nil { return nil @@ -70,3 +94,18 @@ func validateOpCreateOAuth2TokenInput(v *CreateOAuth2TokenInput) error { return nil } } + +func validateOpDeleteResourcePermissionStatementInput(v *DeleteResourcePermissionStatementInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteResourcePermissionStatementInput"} + if v.StatementId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StatementId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md index 44094bebf..f97ebb7f2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.31.3 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.31.2 (2026-06-04) * **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go index 29aadfb96..f0408d2d8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go @@ -3,4 +3,4 @@ package sso // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.31.2" +const goModuleVersion = "1.31.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md index 3cdae3e38..34618bf03 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md @@ -1,3 +1,20 @@ +# v1.36.6 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.5 (2026-06-04) + +* **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.4 (2026-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.3 (2026-06-02) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.36.2 (2026-05-29) * **Dependency Update**: Update to smithy-go v1.26.0. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go index 6ab509bf7..61a97713c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go @@ -3,4 +3,4 @@ package ssooidc // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.36.2" +const goModuleVersion = "1.36.6" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md index 905fdd297..94f33a32d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.43.3 (2026-06-08) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.43.2 (2026-06-04) * **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go index 958c83c1a..1aa2c357e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go @@ -224,6 +224,8 @@ func New(options Options, optFns ...func(*Options)) *Client { ignoreAnonymousAuth(&options) + finalizeSTSRetryableErrors(&options) + wrapWithAnonymousAuth(&options) resolveAuthSchemes(&options) @@ -836,6 +838,10 @@ func addCredentialSource(stack *middleware.Stack, options Options) error { return stack.Build.Insert(&mw, "UserAgent", middleware.Before) } +func finalizeSTSRetryableErrors(o *Options) { + o.Retryer = retry.AddWithErrorCodes(o.Retryer, "IDPCommunicationError") +} + func resolveTracerProvider(options *Options) { if options.TracerProvider == nil { options.TracerProvider = &tracing.NopTracerProvider{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go index ee073b877..ec43bec7c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go @@ -3,4 +3,4 @@ package sts // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.43.2" +const goModuleVersion = "1.43.3" diff --git a/vendor/github.com/go-openapi/runtime/.golangci.yml b/vendor/github.com/go-openapi/runtime/.golangci.yml index ef2ff12be..affd69c88 100644 --- a/vendor/github.com/go-openapi/runtime/.golangci.yml +++ b/vendor/github.com/go-openapi/runtime/.golangci.yml @@ -36,7 +36,7 @@ linters: dupl: threshold: 200 goconst: - min-len: 2 + min-len: 9 min-occurrences: 3 cyclop: max-complexity: 25 diff --git a/vendor/github.com/go-openapi/runtime/CONTRIBUTORS.md b/vendor/github.com/go-openapi/runtime/CONTRIBUTORS.md index ad4c2d246..c632d75c4 100644 --- a/vendor/github.com/go-openapi/runtime/CONTRIBUTORS.md +++ b/vendor/github.com/go-openapi/runtime/CONTRIBUTORS.md @@ -4,12 +4,12 @@ | Total Contributors | Total Contributions | | --- | --- | -| 71 | 557 | +| 71 | 567 | | Username | All Time Contribution Count | All Commits | | --- | --- | --- | | @casualjim | 268 | | -| @fredbi | 132 | | +| @fredbi | 142 | | | @youyuanwu | 19 | | | @josephwoodward | 13 | | | @kenjones-cisco | 12 | | diff --git a/vendor/github.com/go-openapi/runtime/middleware/request.go b/vendor/github.com/go-openapi/runtime/middleware/request.go index 08a0362da..2b8aab08d 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/request.go +++ b/vendor/github.com/go-openapi/runtime/middleware/request.go @@ -73,7 +73,7 @@ func (o *UntypedRequestBinder) bind(request *http.Request, routeParams RoutePara if isMap { tpe := binder.Type() if tpe == nil { - if param.Schema.Type.Contains(typeArray) { + if param.Schema != nil && param.Schema.Type.Contains(typeArray) { tpe = reflect.TypeFor[[]any]() } else { tpe = reflect.TypeFor[map[string]any]() diff --git a/vendor/github.com/go-openapi/spec/.golangci.yml b/vendor/github.com/go-openapi/spec/.golangci.yml index dc7c96053..9d2733176 100644 --- a/vendor/github.com/go-openapi/spec/.golangci.yml +++ b/vendor/github.com/go-openapi/spec/.golangci.yml @@ -4,7 +4,10 @@ linters: disable: - depguard - funlen + - goconst - godox + - gomodguard + - gomodguard_v2 - exhaustruct - nlreturn - nonamedreturns diff --git a/vendor/github.com/go-openapi/spec/CONTRIBUTORS.md b/vendor/github.com/go-openapi/spec/CONTRIBUTORS.md index 0f533c016..2fd257bbe 100644 --- a/vendor/github.com/go-openapi/spec/CONTRIBUTORS.md +++ b/vendor/github.com/go-openapi/spec/CONTRIBUTORS.md @@ -4,12 +4,12 @@ | Total Contributors | Total Contributions | | --- | --- | -| 38 | 396 | +| 38 | 398 | | Username | All Time Contribution Count | All Commits | | --- | --- | --- | | @casualjim | 191 | | -| @fredbi | 94 | | +| @fredbi | 96 | | | @pytlesk4 | 26 | | | @kul-amr | 10 | | | @keramix | 10 | | diff --git a/vendor/github.com/go-openapi/spec/README.md b/vendor/github.com/go-openapi/spec/README.md index 405002b81..7c96eb9a5 100644 --- a/vendor/github.com/go-openapi/spec/README.md +++ b/vendor/github.com/go-openapi/spec/README.md @@ -18,12 +18,9 @@ The object model for OpenAPI v2 specification documents. * **2025-12-19** : new community chat on discord * a new discord community channel is available to be notified of changes and support users - * our venerable Slack channel remains open, and will be eventually discontinued on **2026-03-31** You may join the discord community by clicking the invite link on the discord badge (also above). [![Discord Channel][discord-badge]][discord-url] -Or join our Slack channel: [![Slack Channel][slack-logo]![slack-badge]][slack-url] - ## Status API is stable. @@ -95,9 +92,9 @@ This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). ## Other documentation * [All-time contributors](./CONTRIBUTORS.md) -* [Contributing guidelines](.github/CONTRIBUTING.md) -* [Maintainers documentation](docs/MAINTAINERS.md) -* [Code style](docs/STYLE.md) +* [Contributing guidelines][contributing-doc-site] +* [Maintainers documentation][maintainers-doc-site] +* [Code style][style-doc-site] ## Cutting a new release @@ -132,9 +129,6 @@ Maintainers can cut a new release by either: [doc-url]: https://goswagger.io/go-openapi [godoc-badge]: https://pkg.go.dev/badge/github.com/go-openapi/spec [godoc-url]: http://pkg.go.dev/github.com/go-openapi/spec -[slack-logo]: https://a.slack-edge.com/e6a93c1/img/icons/favicon-32.png -[slack-badge]: https://img.shields.io/badge/slack-blue?link=https%3A%2F%2Fgoswagger.slack.com%2Farchives%2FC04R30YM -[slack-url]: https://goswagger.slack.com/archives/C04R30YMU [discord-badge]: https://img.shields.io/discord/1446918742398341256?logo=discord&label=discord&color=blue [discord-url]: https://discord.gg/FfnFYaC3k5 @@ -146,3 +140,7 @@ Maintainers can cut a new release by either: [goversion-url]: https://github.com/go-openapi/spec/blob/master/go.mod [top-badge]: https://img.shields.io/github/languages/top/go-openapi/spec [commits-badge]: https://img.shields.io/github/commits-since/go-openapi/spec/latest + +[contributing-doc-site]: https://go-openapi.github.io/doc-site/contributing/contributing/index.html +[maintainers-doc-site]: https://go-openapi.github.io/doc-site/maintainers/index.html +[style-doc-site]: https://go-openapi.github.io/doc-site/contributing/style/index.html diff --git a/vendor/github.com/go-openapi/spec/header.go b/vendor/github.com/go-openapi/spec/header.go index 599ba2c5d..f656e0789 100644 --- a/vendor/github.com/go-openapi/spec/header.go +++ b/vendor/github.com/go-openapi/spec/header.go @@ -150,7 +150,11 @@ func (h Header) MarshalJSON() ([]byte, error) { if err != nil { return nil, err } - return jsonutils.ConcatJSON(b1, b2, b3), nil + b4, err := json.Marshal(h.VendorExtensible) + if err != nil { + return nil, err + } + return jsonutils.ConcatJSON(b1, b2, b3, b4), nil } // UnmarshalJSON unmarshals this header from JSON. diff --git a/vendor/github.com/go-openapi/spec/schema_loader.go b/vendor/github.com/go-openapi/spec/schema_loader.go index 0894c932c..1e346069e 100644 --- a/vendor/github.com/go-openapi/spec/schema_loader.go +++ b/vendor/github.com/go-openapi/spec/schema_loader.go @@ -117,7 +117,7 @@ func (r *schemaLoader) updateBasePath(transitive *schemaLoader, basePath string) func (r *schemaLoader) resolveRef(ref *Ref, target any, basePath string) error { tgt := reflect.ValueOf(target) - if tgt.Kind() != reflect.Ptr { + if tgt.Kind() != reflect.Pointer { return ErrResolveRefNeedsAPointer } diff --git a/vendor/github.com/go-openapi/swag/CONTRIBUTORS.md b/vendor/github.com/go-openapi/swag/CONTRIBUTORS.md index 286878acf..ef1a73529 100644 --- a/vendor/github.com/go-openapi/swag/CONTRIBUTORS.md +++ b/vendor/github.com/go-openapi/swag/CONTRIBUTORS.md @@ -4,11 +4,11 @@ | Total Contributors | Total Contributions | | --- | --- | -| 24 | 242 | +| 24 | 246 | | Username | All Time Contribution Count | All Commits | | --- | --- | --- | -| @fredbi | 112 | | +| @fredbi | 116 | | | @casualjim | 98 | | | @alexandear | 4 | | | @orisano | 3 | | diff --git a/vendor/github.com/go-openapi/swag/README.md b/vendor/github.com/go-openapi/swag/README.md index 64f667103..ddbd8735c 100644 --- a/vendor/github.com/go-openapi/swag/README.md +++ b/vendor/github.com/go-openapi/swag/README.md @@ -34,12 +34,9 @@ You may also use it standalone for your projects. * **2025-12-19** : new community chat on discord * a new discord community channel is available to be notified of changes and support users - * our venerable Slack channel remains open, and will be eventually discontinued on **2026-03-31** You may join the discord community by clicking the invite link on the discord badge (also above). [![Discord Channel][discord-badge]][discord-url] -Or join our Slack channel: [![Slack Channel][slack-logo]![slack-badge]][slack-url] - ## Status API is stable. @@ -171,9 +168,9 @@ on top of which it has been built. ## Other documentation * [All-time contributors](./CONTRIBUTORS.md) -* [Contributing guidelines](.github/CONTRIBUTING.md) -* [Maintainers documentation](docs/MAINTAINERS.md) -* [Code style](docs/STYLE.md) +* [Contributing guidelines][contributing-doc-site] +* [Maintainers documentation][maintainers-doc-site] +* [Code style][style-doc-site] ## Cutting a new release @@ -208,9 +205,6 @@ Maintainers can cut a new release by either: [doc-url]: https://goswagger.io/go-openapi [godoc-badge]: https://pkg.go.dev/badge/github.com/go-openapi/swag [godoc-url]: http://pkg.go.dev/github.com/go-openapi/swag -[slack-logo]: https://a.slack-edge.com/e6a93c1/img/icons/favicon-32.png -[slack-badge]: https://img.shields.io/badge/slack-blue?link=https%3A%2F%2Fgoswagger.slack.com%2Farchives%2FC04R30YM -[slack-url]: https://goswagger.slack.com/archives/C04R30YMU [discord-badge]: https://img.shields.io/discord/1446918742398341256?logo=discord&label=discord&color=blue [discord-url]: https://discord.gg/FfnFYaC3k5 @@ -222,3 +216,7 @@ Maintainers can cut a new release by either: [goversion-url]: https://github.com/go-openapi/swag/blob/master/go.mod [top-badge]: https://img.shields.io/github/languages/top/go-openapi/swag [commits-badge]: https://img.shields.io/github/commits-since/go-openapi/swag/latest + +[contributing-doc-site]: https://go-openapi.github.io/doc-site/contributing/contributing/index.html +[maintainers-doc-site]: https://go-openapi.github.io/doc-site/maintainers/index.html +[style-doc-site]: https://go-openapi.github.io/doc-site/contributing/style/index.html diff --git a/vendor/github.com/go-openapi/validate/CONTRIBUTORS.md b/vendor/github.com/go-openapi/validate/CONTRIBUTORS.md index 46da8797d..0f5497c8b 100644 --- a/vendor/github.com/go-openapi/validate/CONTRIBUTORS.md +++ b/vendor/github.com/go-openapi/validate/CONTRIBUTORS.md @@ -4,12 +4,12 @@ | Total Contributors | Total Contributions | | --- | --- | -| 31 | 302 | +| 31 | 305 | | Username | All Time Contribution Count | All Commits | | --- | --- | --- | | @casualjim | 169 | | -| @fredbi | 65 | | +| @fredbi | 68 | | | @sttts | 11 | | | @youyuanwu | 9 | | | @keramix | 8 | | diff --git a/vendor/github.com/go-openapi/validate/README.md b/vendor/github.com/go-openapi/validate/README.md index 17bd03b60..b814a2ef1 100644 --- a/vendor/github.com/go-openapi/validate/README.md +++ b/vendor/github.com/go-openapi/validate/README.md @@ -18,12 +18,9 @@ A validator for OpenAPI v2 specifications and JSON schema draft 4. * **2025-12-19** : new community chat on discord * a new discord community channel is available to be notified of changes and support users - * our venerable Slack channel remains open, and will be eventually discontinued on **2026-03-31** You may join the discord community by clicking the invite link on the discord badge (also above). [![Discord Channel][discord-badge]][discord-url] -Or join our Slack channel: [![Slack Channel][slack-logo]![slack-badge]][slack-url] - ## Status API is stable. @@ -75,9 +72,9 @@ This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). ## Other documentation * [All-time contributors](./CONTRIBUTORS.md) -* [Contributing guidelines](.github/CONTRIBUTING.md) -* [Maintainers documentation](docs/MAINTAINERS.md) -* [Code style](docs/STYLE.md) +* [Contributing guidelines][contributing-doc-site] +* [Maintainers documentation][maintainers-doc-site] +* [Code style][style-doc-site] ## Cutting a new release @@ -108,9 +105,6 @@ Maintainers can cut a new release by either: [godoc-badge]: https://pkg.go.dev/badge/github.com/go-openapi/validate [godoc-url]: http://pkg.go.dev/github.com/go-openapi/validate -[slack-logo]: https://a.slack-edge.com/e6a93c1/img/icons/favicon-32.png -[slack-badge]: https://img.shields.io/badge/slack-blue?link=https%3A%2F%2Fgoswagger.slack.com%2Farchives%2FC04R30YM -[slack-url]: https://goswagger.slack.com/archives/C04R30YMU [discord-badge]: https://img.shields.io/discord/1446918742398341256?logo=discord&label=discord&color=blue [discord-url]: https://discord.gg/FfnFYaC3k5 @@ -122,3 +116,7 @@ Maintainers can cut a new release by either: [goversion-url]: https://github.com/go-openapi/validate/blob/master/go.mod [top-badge]: https://img.shields.io/github/languages/top/go-openapi/validate [commits-badge]: https://img.shields.io/github/commits-since/go-openapi/validate/latest + +[contributing-doc-site]: https://go-openapi.github.io/doc-site/contributing/contributing/index.html +[maintainers-doc-site]: https://go-openapi.github.io/doc-site/maintainers/index.html +[style-doc-site]: https://go-openapi.github.io/doc-site/contributing/style/index.html diff --git a/vendor/github.com/go-openapi/validate/spec.go b/vendor/github.com/go-openapi/validate/spec.go index b85432f92..0849e47ea 100644 --- a/vendor/github.com/go-openapi/validate/spec.go +++ b/vendor/github.com/go-openapi/validate/spec.go @@ -146,7 +146,8 @@ func (s *SpecValidator) Validate(data any) (*Result, *Result) { errs.Merge(s.validateNonEmptyPathParamNames()) // errs.Merge(s.validateRefNoSibling()) // warning only - errs.Merge(s.validateReferenced()) // warning only + errs.Merge(s.validateReferenced()) // warning only + errs.Merge(s.validateDubiousRefs()) // warning only return errs, warnings } @@ -553,8 +554,12 @@ DEFINITIONS: if schema.Required != nil { // Safeguard for _, pn := range schema.Required { red := s.validateRequiredProperties(pn, d, &schema) //#nosec + // NOTE: capture validity before merging: Merge may redeem `red` to the + // pool (wantsRedeemOnMerge), after which reading it races with a concurrent + // BorrowResult().cleared() in another goroutine sharing the global pool. + isValid := red.IsValid() res.Merge(red) - if !red.IsValid() && !s.Options.ContinueOnErrors { + if !isValid && !s.Options.ContinueOnErrors { break DEFINITIONS // there is an error, let's stop that bleeding } } diff --git a/vendor/github.com/go-openapi/validate/spec_messages.go b/vendor/github.com/go-openapi/validate/spec_messages.go index 42ce36028..eeb8a8695 100644 --- a/vendor/github.com/go-openapi/validate/spec_messages.go +++ b/vendor/github.com/go-openapi/validate/spec_messages.go @@ -177,6 +177,18 @@ const ( // UnusedResponseWarning ... UnusedResponseWarning = "response %q is not used anywhere" + // DubiousAbsoluteRefWarning flags a $ref pointing to an absolute local file location that escapes the + // spec's base path. Absolute local references are legitimate when they stay beneath the base path + // (flattening/expansion introduces such anchors for cyclical $refs), but an absolute reference that + // escapes the base path - or a file:// reference in a spec with no known base - may indicate an + // unsafe or adversarial spec. + DubiousAbsoluteRefWarning = "$ref %q points to an absolute or local file location that escapes the spec's base path: this may be unsafe with adversarial specs" + + // DubiousMultipleHostsWarning flags a spec whose remote $refs resolve to several distinct hosts. + // A single consistent remote host is common and legitimate; references spread across multiple hosts + // may indicate an unsafe or adversarial spec. + DubiousMultipleHostsWarning = "$ref values point to %d distinct remote hosts (%s): a spec referencing multiple hosts may be unsafe" + InvalidObject = "expected an object in %q.%s" ) @@ -404,3 +416,11 @@ func someParametersBrokenMsg(path, method, operationID string) errors.Error { func refShouldNotHaveSiblingsMsg(path, operationID string) errors.Error { return errors.New(errors.CompositeErrorCode, RefShouldNotHaveSiblingsWarning, operationID, path) } + +func dubiousAbsoluteRefMsg(ref string) errors.Error { + return errors.New(errors.CompositeErrorCode, DubiousAbsoluteRefWarning, ref) +} + +func dubiousMultipleHostsMsg(count int, hosts string) errors.Error { + return errors.New(errors.CompositeErrorCode, DubiousMultipleHostsWarning, count, hosts) +} diff --git a/vendor/github.com/go-openapi/validate/spec_ref_warnings.go b/vendor/github.com/go-openapi/validate/spec_ref_warnings.go new file mode 100644 index 000000000..49c72314c --- /dev/null +++ b/vendor/github.com/go-openapi/validate/spec_ref_warnings.go @@ -0,0 +1,209 @@ +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + +package validate + +import ( + "net/url" + "path" + "sort" + "strings" + + "github.com/go-openapi/spec" +) + +// minDistinctHostsToWarn is the number of distinct remote hosts among $refs at or above which +// Rule 2 emits a host-spread warning. A single consistent remote host is legitimate. +const minDistinctHostsToWarn = 2 + +// validateDubiousRefs emits warnings (never errors) when $ref locations match patterns +// that may indicate an unsafe or adversarial spec. It inspects refs as authored, on the +// UNEXPANDED spec, so it must run before expansion flattens them away. +// +// Two rules are applied over s.analyzer.AllRefs(): +// +// - Rule 1 (absolute local escape): a $ref pointing to an absolute local file location +// (file:// scheme, a Unix absolute path, or a Windows drive path such as C:\) is dubious +// UNLESS it stays beneath the spec's base path. Absolute refs beneath the base are +// legitimate: flattening/expansion in go-openapi/spec and analysis introduces absolute +// anchors to resolve cyclical $refs. Relative and fragment-only refs are always exempt. +// +// - Rule 2 (host spread): when remote (http/https, or protocol-relative) refs resolve to +// two or more distinct hosts, a single aggregate warning lists them. A single consistent +// remote host is common and legitimate, so it is not flagged. +// +// All findings are warnings: they do not affect validity (see Result.IsValid). +func (s *SpecValidator) validateDubiousRefs() *Result { + res := pools.poolOfResults.BorrowResult() + + baseDir, hasBase := s.localBaseDir() + + remoteHosts := make(map[string]struct{}) + for _, r := range s.analyzer.AllRefs() { + u := r.GetURL() + if u == nil { // Safeguard: a valid spec always yields parseable refs + continue + } + + // Rule 1: absolute local reference escaping the base path. + if refPath, isLocalAbs := absoluteLocalRefPath(r, u); isLocalAbs { + if !hasBase || !isBeneathBase(refPath, baseDir) { + res.AddWarnings(dubiousAbsoluteRefMsg(r.String())) + } + continue + } + + // Rule 2: gather remote hosts (http/https and protocol-relative //host/...). + if host := remoteRefHost(u); host != "" { + remoteHosts[host] = struct{}{} + } + } + + if len(remoteHosts) >= minDistinctHostsToWarn { + hosts := make([]string, 0, len(remoteHosts)) + for h := range remoteHosts { + hosts = append(hosts, h) + } + sort.Strings(hosts) + res.AddWarnings(dubiousMultipleHostsMsg(len(hosts), strings.Join(hosts, ", "))) + } + + return res +} + +// absoluteLocalRefPath reports whether r is an absolute LOCAL file reference and, if so, +// returns the cleaned path it points to (without scheme/fragment, drive letter lower-cased). +// +// Classification order matters (see the empirical jsonreference flag behavior): +// - file:// scheme is local, including UNC file://host/share (inherently dubious). +// - a non-empty Host with no file scheme means remote (http/https or protocol-relative +// //host/path) - NOT local; handled by Rule 2. This must be checked before the Unix +// branch, because protocol-relative refs also set HasFullFilePath. +// - len(u.Scheme) == 1 is a Windows drive path (C:\ or C:/), whose drive+path land in +// Scheme/Opaque/Path rather than Path. Checked before the Unix branch because C:/x also +// sets HasFullFilePath, and reconstructed from the authored ref string to keep the drive. +// - !r.HasFullURL && r.HasFullFilePath is a plain Unix absolute path (/abs/models.json). +// +// Relative (./x.json) and fragment-only (#/definitions/X) refs return false. +func absoluteLocalRefPath(r spec.Ref, u *url.URL) (string, bool) { + switch { + case r.HasFileScheme: + return fileRefPath(u), true + case u.Host != "": + // Remote (http/https) or protocol-relative //host/path: handled by Rule 2. + return "", false + case len(u.Scheme) == 1: + // Windows drive letter: reconstruct from the authored ref string. + return cleanRefPath(r.String()), true + case !r.HasFullURL && r.HasFullFilePath: + return cleanRefPath(u.Path), true + default: + return "", false + } +} + +// remoteRefHost returns the host of a remote reference (http/https), or of a protocol-relative +// reference (//host/path). It returns "" for local and fragment-only refs. file:// hosts (UNC) +// are deliberately excluded: those are handled as local-absolute refs by Rule 1. +func remoteRefHost(u *url.URL) string { + switch u.Scheme { + case "http", "https": + return u.Host + case "": + // Protocol-relative //host/path: empty scheme but a host is present. + return u.Host + default: + return "" + } +} + +// localBaseDir returns the directory of the spec file, slash-normalized, when the spec was +// loaded from a local path. It returns ok=false when the base is unknown (in-memory spec) or +// remote (http/https), in which case absolute-local refs cannot be proven beneath a base and +// are treated as dubious. +func (s *SpecValidator) localBaseDir() (string, bool) { + specPath := s.spec.SpecFilePath() + if specPath == "" { + return "", false + } + + // Strip a file:// scheme if present; reject remote bases. + if u, err := url.Parse(specPath); err == nil && u.Scheme != "" { + switch { + case u.Scheme == "file": + specPath = u.Path + case len(u.Scheme) == 1: // Windows drive letter, treat as local + // keep specPath as-is (authored path) + default: // http, https, ... : no local base + return "", false + } + } + + return path.Dir(cleanRefPath(specPath)), true +} + +// isBeneathBase reports whether the cleaned target path is located within baseDir, i.e. it does +// not escape baseDir via "..". Comparison is purely lexical on cleaned paths, which is sufficient +// (and cross-platform safe) for a non-fatal warning. Both sides are expected to already be +// cleanRefPath-normalized (slashes, drive-letter case). +func isBeneathBase(target, baseDir string) bool { + if baseDir == "" { + return false + } + if target == baseDir { + return true + } + if !strings.HasSuffix(baseDir, "/") { + baseDir += "/" + } + return strings.HasPrefix(target, baseDir) +} + +// fileRefPath extracts the local path a file:// reference points to, accounting for the way +// Windows file URLs parse: +// - file:///abs/x -> /abs/x (empty host) +// - file:///C:/dir/x -> /c:/dir/x (empty host; drive sits in the path) +// - file://D:/a/x -> d:/a/x (drive letter lands in Host, rejoin it) +// - file://host/share -> /host/share/x (real UNC host kept visible so it cannot match a +// local base and stays flagged as dubious) +func fileRefPath(u *url.URL) string { + switch { + case u.Host == "": + return cleanRefPath(u.Path) + case isDriveHost(u.Host): + // Windows path authored as file://D:/... : the drive landed in Host (e.g. "d:"). + return cleanRefPath(u.Host + u.Path) + default: + // Real remote/UNC host: keep it in the path so it never matches a local base. + return cleanRefPath("//" + u.Host + u.Path) + } +} + +// isDriveHost reports whether a URL host is actually a Windows drive letter (e.g. "d:"), which +// happens when a Windows path is authored as a two-slash file URL: file://D:/path. +func isDriveHost(host string) bool { + h := strings.TrimSuffix(host, ":") + if len(h) != 1 { + return false + } + c := h[0] + return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') +} + +// cleanRefPath normalizes a ref or base path for lexical comparison: backslashes to forward +// slashes, path.Clean, and a lower-cased leading Windows drive letter (matching the behavior of +// go-openapi/spec's normalizer). Plain Unix paths are unaffected, preserving case-sensitivity. +func cleanRefPath(p string) string { + p = path.Clean(strings.ReplaceAll(p, `\`, `/`)) + switch { + case len(p) >= 2 && p[1] == ':': + // drive-letter form: C:/dir -> c:/dir + p = strings.ToLower(p[:1]) + p[1:] + case len(p) >= 3 && p[0] == '/' && p[2] == ':': + // slash-prefixed drive form from canonical file:// URLs: /C:/dir -> c:/dir. + // The leading slash is dropped so this matches the base path derived from + // SpecFilePath (which has no leading slash), and the bare-drive form. + p = strings.ToLower(p[1:2]) + p[2:] + } + return p +} diff --git a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/image.go b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/image.go index 8002d6743..a06f62143 100644 --- a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/image.go +++ b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/image.go @@ -633,6 +633,13 @@ type Image struct { // // Equivalent to Docker's `--output` flag. Exports ExportArrayOutput `pulumi:"exports"` + // A list of secret names to ignore when calculating diffs. + // + // These secrets will not be considered when calculating diffs, even if they + // are changed. Note: only applicable if the secret is present in both the old and the new state. + // + // This is useful when you want to avoid unnecessary rebuilds caused by short-lived secrets that change on every run. + IgnoreSecretsInDiffCalculation pulumi.StringArrayOutput `pulumi:"ignoreSecretsInDiffCalculation"` // Attach arbitrary key/value metadata to the image. // // Equivalent to Docker's `--label` flag. @@ -843,6 +850,13 @@ type imageArgs struct { // // Equivalent to Docker's `--output` flag. Exports []Export `pulumi:"exports"` + // A list of secret names to ignore when calculating diffs. + // + // These secrets will not be considered when calculating diffs, even if they + // are changed. Note: only applicable if the secret is present in both the old and the new state. + // + // This is useful when you want to avoid unnecessary rebuilds caused by short-lived secrets that change on every run. + IgnoreSecretsInDiffCalculation []string `pulumi:"ignoreSecretsInDiffCalculation"` // Attach arbitrary key/value metadata to the image. // // Equivalent to Docker's `--label` flag. @@ -991,6 +1005,13 @@ type ImageArgs struct { // // Equivalent to Docker's `--output` flag. Exports ExportArrayInput + // A list of secret names to ignore when calculating diffs. + // + // These secrets will not be considered when calculating diffs, even if they + // are changed. Note: only applicable if the secret is present in both the old and the new state. + // + // This is useful when you want to avoid unnecessary rebuilds caused by short-lived secrets that change on every run. + IgnoreSecretsInDiffCalculation pulumi.StringArrayInput // Attach arbitrary key/value metadata to the image. // // Equivalent to Docker's `--label` flag. @@ -1234,6 +1255,16 @@ func (o ImageOutput) Exports() ExportArrayOutput { return o.ApplyT(func(v *Image) ExportArrayOutput { return v.Exports }).(ExportArrayOutput) } +// A list of secret names to ignore when calculating diffs. +// +// These secrets will not be considered when calculating diffs, even if they +// are changed. Note: only applicable if the secret is present in both the old and the new state. +// +// This is useful when you want to avoid unnecessary rebuilds caused by short-lived secrets that change on every run. +func (o ImageOutput) IgnoreSecretsInDiffCalculation() pulumi.StringArrayOutput { + return o.ApplyT(func(v *Image) pulumi.StringArrayOutput { return v.IgnoreSecretsInDiffCalculation }).(pulumi.StringArrayOutput) +} + // Attach arbitrary key/value metadata to the image. // // Equivalent to Docker's `--label` flag. diff --git a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal/pulumiUtilities.go b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal/pulumiUtilities.go index 6646e9c9d..5bf858ddf 100644 --- a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal/pulumiUtilities.go +++ b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal/pulumiUtilities.go @@ -165,7 +165,7 @@ func callPlainInner( func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { defaults := []pulumi.ResourceOption{} - version := semver.MustParse("0.0.18") + version := semver.MustParse("0.0.19") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } @@ -176,7 +176,7 @@ func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOptio func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption { defaults := []pulumi.InvokeOption{} - version := semver.MustParse("0.0.18") + version := semver.MustParse("0.0.19") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } diff --git a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/pulumi-plugin.json b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/pulumi-plugin.json index 5fd8c9353..3049ff9dc 100644 --- a/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/pulumi-plugin.json +++ b/vendor/github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/pulumi-plugin.json @@ -1,5 +1,5 @@ { "resource": true, "name": "docker-build", - "version": "0.0.18" + "version": "0.0.19" } diff --git a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/applicationSettings.go b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/applicationSettings.go index 7c29e21e4..81e84e3c3 100644 --- a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/applicationSettings.go +++ b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/applicationSettings.go @@ -20,7 +20,7 @@ import ( // // > All `ApplicationSettings` use the same ID `gitlab`. // -// !> This resource does not implement any destroy logic, it's a no-op at this point. +// > This resource does not implement any destroy logic, it's a no-op at this point. // // It's also not possible to revert to the previous settings. // diff --git a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/branch.go b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/branch.go index 263f3f6d8..a93ad7282 100644 --- a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/branch.go +++ b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/branch.go @@ -14,7 +14,7 @@ import ( // The `Branch` resource manages the lifecycle of a repository branch. // -// !> The `ref` attribute is only set in state on resource creation. Imports or divergent branches can lead Terraform to destroy and recreate the resource. Use the lifecycle meta-argument to ignore changes to avoid this behavior. +// > The `ref` attribute is only set in state on resource creation. Imports or divergent branches can lead Terraform to destroy and recreate the resource. Use the lifecycle meta-argument to ignore changes to avoid this behavior. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/branches/) // diff --git a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/clusterAgentToken.go b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/clusterAgentToken.go index 10771a9ca..c5f99a1a9 100644 --- a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/clusterAgentToken.go +++ b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/clusterAgentToken.go @@ -53,14 +53,14 @@ import ( // return err // } // thisClusterAgent, err := gitlab.NewClusterAgent(ctx, "this", &gitlab.ClusterAgentArgs{ -// Project: pulumi.String(pulumi.String(this.Id)), +// Project: pulumi.String(this.Id), // Name: pulumi.String("my-agent"), // }) // if err != nil { // return err // } // thisClusterAgentToken, err := gitlab.NewClusterAgentToken(ctx, "this", &gitlab.ClusterAgentTokenArgs{ -// Project: pulumi.String(pulumi.String(this.Id)), +// Project: pulumi.String(this.Id), // AgentId: thisClusterAgent.AgentId, // Name: pulumi.String("my-agent-token"), // Description: pulumi.String("Token for the my-agent used with `gitlab-agent` Helm Chart"), diff --git a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/getGroupServiceAccountAccessTokens.go b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/getGroupServiceAccountAccessTokens.go index f0c5806a3..5ef12c652 100644 --- a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/getGroupServiceAccountAccessTokens.go +++ b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/getGroupServiceAccountAccessTokens.go @@ -18,6 +18,8 @@ import ( // > **Permissions:** You must have administrator access or be an Owner of the group to list the tokens of a service account. // // **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/personal_access_tokens/#list-all-personal-access-tokens) +// +// ## Example Usage func GetGroupServiceAccountAccessTokens(ctx *pulumi.Context, args *GetGroupServiceAccountAccessTokensArgs, opts ...pulumi.InvokeOption) (*GetGroupServiceAccountAccessTokensResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetGroupServiceAccountAccessTokensResult diff --git a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/getSecurityPolicyDocument.go b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/getSecurityPolicyDocument.go index c858bc0af..77b3c7158 100644 --- a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/getSecurityPolicyDocument.go +++ b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/getSecurityPolicyDocument.go @@ -59,7 +59,7 @@ import ( // Project: pulumi.String("1234"), // Ref: "main", // FilePath: pulumi.String(".gitlab/security-policies/policy.yml"), -// Content: pulumi.String(pulumi.String(scan.Yaml)), +// Content: pulumi.String(scan.Yaml), // }) // if err != nil { // return err diff --git a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/integrationHarbor.go b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/integrationHarbor.go index 2c918bf34..0c6c66476 100644 --- a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/integrationHarbor.go +++ b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/integrationHarbor.go @@ -49,7 +49,7 @@ import ( // Url: pulumi.String("http://harbor.example.com"), // ProjectName: pulumi.String("my_project_name"), // Username: pulumi.String("username"), -// Password: pulumi.String(pulumi.String(password)), +// Password: pulumi.String(password), // }) // if err != nil { // return err diff --git a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/internal/pulumiUtilities.go b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/internal/pulumiUtilities.go index ae2339d5d..947c4d028 100644 --- a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/internal/pulumiUtilities.go +++ b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/internal/pulumiUtilities.go @@ -165,7 +165,7 @@ func callPlainInner( func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { defaults := []pulumi.ResourceOption{} - version := semver.MustParse("9.11.0") + version := semver.MustParse("9.11.1") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } @@ -176,7 +176,7 @@ func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOptio func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption { defaults := []pulumi.InvokeOption{} - version := semver.MustParse("9.11.0") + version := semver.MustParse("9.11.1") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } diff --git a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/pulumi-plugin.json b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/pulumi-plugin.json index 0b627b343..674cd5d85 100644 --- a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/pulumi-plugin.json +++ b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/pulumi-plugin.json @@ -1,5 +1,5 @@ { "resource": true, "name": "gitlab", - "version": "9.11.0" + "version": "9.11.1" } diff --git a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/userGpgKey.go b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/userGpgKey.go index 3cdc5cf03..67b519d7c 100644 --- a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/userGpgKey.go +++ b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/userGpgKey.go @@ -40,7 +40,7 @@ import ( // } // // Manages a GPG key for the specified user. An admin token is required if `user_id` is specified. // _, err = gitlab.NewUserGpgKey(ctx, "example", &gitlab.UserGpgKeyArgs{ -// UserId: pulumi.Int(pulumi.String(example.Id)), +// UserId: pulumi.String(example.Id), // Key: pulumi.String("-----BEGIN PGP PUBLIC KEY BLOCK-----\n...\n-----END PGP PUBLIC KEY BLOCK-----"), // }) // if err != nil { diff --git a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/userSshKey.go b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/userSshKey.go index facdd0c18..7c6af250e 100644 --- a/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/userSshKey.go +++ b/vendor/github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/userSshKey.go @@ -37,7 +37,7 @@ import ( // return err // } // _, err = gitlab.NewUserSshKey(ctx, "example", &gitlab.UserSshKeyArgs{ -// UserId: pulumi.Int(pulumi.String(example.Id)), +// UserId: pulumi.String(example.Id), // Title: pulumi.String("example-key"), // Key: pulumi.String("ssh-ed25519 AAAA..."), // ExpiresAt: pulumi.String("2016-01-21T00:00:00.000Z"), diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/.version b/vendor/github.com/pulumi/pulumi/sdk/v3/.version index 68242d65a..20688f03b 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/.version +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/.version @@ -1 +1 @@ -3.245.0 +3.246.0 diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/apitype/core.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/apitype/core.go index ff4f2949e..77d9f5f3b 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/apitype/core.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/apitype/core.go @@ -35,6 +35,7 @@ import ( "fmt" "time" + "github.com/blang/semver" "github.com/pulumi/pulumi/sdk/v3/go/common/providers" "github.com/pulumi/pulumi/sdk/v3/go/common/resource" "github.com/pulumi/pulumi/sdk/v3/go/common/resource/config" @@ -163,6 +164,11 @@ type DeploymentV3 struct { PendingOperations []OperationV2 `json:"pending_operations,omitempty" yaml:"pending_operations,omitempty"` // Metadata associated with the snapshot. Metadata SnapshotMetadataV1 `json:"metadata,omitempty" yaml:"metadata,omitempty"` + // Snippets are any PCL snippets associated with the snapshot. The engine reruns these on every update to + // produce additional resources alongside the program's. Deployments that include snippets must declare the + // "snippets" feature so older CLIs that cannot evaluate them refuse the snapshot rather than silently + // dropping the resources they would produce. + Snippets []SnippetV1 `json:"snippets,omitempty" yaml:"snippets,omitempty"` } func (snap *DeploymentV3) ToUntypedDeployment(version int, features []string) (*UntypedDeployment, error) { @@ -258,6 +264,15 @@ func (snap *DeploymentV3) NormalizeURNReferences() (*DeploymentV3, error) { } } + // Rewrite References on every snippet. Each value is a URN that may have been an alias for a resource that + // is now stored under its canonical URN; updating in place keeps future updates resolving cleanly through + // the broker. + for i := range snap.Snippets { + for k, v := range snap.Snippets[i].References { + snap.Snippets[i].References[k] = string(fixURN(resource.URN(v))) + } + } + return snap, nil } @@ -272,6 +287,45 @@ type SnapshotMetadataV1 struct { IntegrityErrorMetadata *SnapshotIntegrityErrorMetadataV1 `json:"integrity_error,omitempty" yaml:"integrity_error,omitempty"` } +// SnippetV1 is the serialized form of a PCL snippet stored alongside a snapshot. Snippets are evaluated by the +// engine on every update to produce additional resource registrations. +type SnippetV1 struct { + // Name is the logical name of the resource this snippet registers. + Name string `json:"name" yaml:"name"` + // Type is the type token of the resource this snippet registers. + Type string `json:"type" yaml:"type"` + // Code is the PCL source for the body of the resource. + Code string `json:"code" yaml:"code"` + // Descriptor identifies the package that owns the resource type. + Descriptor PackageDescriptorV1 `json:"descriptor" yaml:"descriptor"` + // References declares external resources that the snippet's Code may refer to by HCL identifier. The map + // key is the identifier used inside Code; the value is the URN of the target resource. Subject to URN + // normalisation (aliases) on each snapshot write. + References map[string]string `json:"references,omitempty" yaml:"references,omitempty"` +} + +// PackageDescriptorV1 is the serialized form of a package descriptor for a snippet. +type PackageDescriptorV1 struct { + // Name is the simple name of the plugin. + Name string `json:"name" yaml:"name"` + // Version is the optional version of the plugin. + Version *semver.Version `json:"version,omitempty" yaml:"version,omitempty"` + // DownloadURL is the optional URL to use when downloading the provider plugin binary. + DownloadURL string `json:"downloadURL,omitempty" yaml:"downloadURL,omitempty"` + // Parameterization is the optional parameterization of the package. + Parameterization *ParameterizationDescriptorV1 `json:"parameterization,omitempty" yaml:"parameterization,omitempty"` +} + +// ParameterizationDescriptorV1 is the serialized form of a parameterization for a packaged plugin. +type ParameterizationDescriptorV1 struct { + // Name is the name of the parameterized package. + Name string `json:"name" yaml:"name"` + // Version is the version of the parameterized package. + Version semver.Version `json:"version" yaml:"version"` + // Value is the parameter value of the package. + Value []byte `json:"value" yaml:"value"` +} + // SnapshotIntegrityErrorMetadataV1 contains metadata about a snapshot integrity error, such as the version // and invocation of the Pulumi engine that caused it. type SnapshotIntegrityErrorMetadataV1 struct { diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/apitype/deployments.json b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/apitype/deployments.json index a0d343aca..6ce38c355 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/apitype/deployments.json +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/apitype/deployments.json @@ -79,6 +79,17 @@ "items": { "$ref": "#/$defs/operationV2" } + }, + "metadata": { + "description": "Metadata associated with the snapshot.", + "type": "object" + }, + "snippets": { + "description": "PCL snippets evaluated by the engine on every update.", + "type": "array", + "items": { + "$ref": "#/$defs/snippetV1" + } } }, "required": ["manifest"], @@ -175,6 +186,85 @@ }, "required": ["resource", "type"], "additionalProperties": false + }, + "snippetV1": { + "title": "PCL Snippet V1", + "description": "A PCL snippet stored alongside a snapshot. The engine evaluates these on every update.", + "type": "object", + "properties": { + "name": { + "description": "The logical name of the resource this snippet registers.", + "type": "string" + }, + "type": { + "description": "The type token of the resource this snippet registers.", + "type": "string" + }, + "code": { + "description": "The PCL source for the body of the resource.", + "type": "string" + }, + "descriptor": { + "description": "The package descriptor for the resource type.", + "$ref": "#/$defs/packageDescriptorV1" + }, + "references": { + "description": "External resources the snippet code may refer to by HCL identifier. The map key is the identifier used inside the code; the value is the URN of the target resource.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": ["name", "type", "code", "descriptor"], + "additionalProperties": false + }, + "packageDescriptorV1": { + "title": "Package Descriptor V1", + "description": "Identifies the package and optional parameterization for a snippet's resource type.", + "type": "object", + "properties": { + "name": { + "description": "The simple name of the plugin.", + "type": "string" + }, + "version": { + "description": "The optional semver version of the plugin.", + "type": "string" + }, + "downloadURL": { + "description": "The optional URL to use when downloading the provider plugin binary.", + "type": "string" + }, + "parameterization": { + "description": "The optional parameterization of the package.", + "$ref": "#/$defs/parameterizationDescriptorV1" + } + }, + "required": ["name"], + "additionalProperties": false + }, + "parameterizationDescriptorV1": { + "title": "Parameterization Descriptor V1", + "description": "Parameterization data for a packaged plugin.", + "type": "object", + "properties": { + "name": { + "description": "The name of the parameterized package.", + "type": "string" + }, + "version": { + "description": "The semver version of the parameterized package.", + "type": "string" + }, + "value": { + "description": "The base64-encoded parameter value.", + "type": "string", + "contentEncoding": "base64" + } + }, + "required": ["name", "version", "value"], + "additionalProperties": false } } } diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/custom_timeouts.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/custom_timeouts.go index e926f8f20..63fc48aea 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/custom_timeouts.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/custom_timeouts.go @@ -18,8 +18,9 @@ type CustomTimeouts struct { Create float64 `json:"create,omitempty" yaml:"create,omitempty"` Update float64 `json:"update,omitempty" yaml:"update,omitempty"` Delete float64 `json:"delete,omitempty" yaml:"delete,omitempty"` + Read float64 `json:"read,omitempty" yaml:"read,omitempty"` } func (c *CustomTimeouts) IsNotEmpty() bool { - return c.Delete != 0 || c.Update != 0 || c.Create != 0 + return c.Delete != 0 || c.Update != 0 || c.Create != 0 || c.Read != 0 } diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/analyzer_plugin.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/analyzer_plugin.go index e0ec9e886..128afcfa8 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/analyzer_plugin.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/analyzer_plugin.go @@ -756,6 +756,7 @@ func marshalResourceOptions(opts AnalyzerResourceOptions) *pulumirpc.AnalyzerRes Create: opts.CustomTimeouts.Create, Update: opts.CustomTimeouts.Update, Delete: opts.CustomTimeouts.Delete, + Read: opts.CustomTimeouts.Read, }, Parent: string(opts.Parent), } diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/analyzer_server.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/analyzer_server.go index bdfce92d9..0071957fe 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/analyzer_server.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/analyzer_server.go @@ -413,6 +413,7 @@ func convertResourceOptions(opts *pulumirpc.AnalyzerResourceOptions) AnalyzerRes Create: t.GetCreate(), Update: t.GetUpdate(), Delete: t.GetDelete(), + Read: t.GetRead(), } } diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/provider.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/provider.go index 653d3253a..4f96035dc 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/provider.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/provider.go @@ -283,6 +283,8 @@ type ReadRequest struct { Type tokens.Type ID resource.ID Inputs, State resource.PropertyMap + // Timeout is the time, in seconds, that the caller is prepared to wait for the operation to complete. + Timeout float64 // The gRPC address of the ResourceStatus service which can be used to read view resources. ResourceStatusAddress string // The ResourceStatus service token to pass when calling methods on the service. @@ -937,6 +939,7 @@ type CustomTimeouts struct { Create string Update string Delete string + Read string } // ConstructResult is the result of a call to Construct. diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/provider_plugin.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/provider_plugin.go index 341bec4fe..93eb043d7 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/provider_plugin.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/provider_plugin.go @@ -1512,6 +1512,7 @@ func (p *provider) Read(ctx context.Context, req ReadRequest) (ReadResponse, err Type: req.URN.Type().String(), Properties: mstate, Inputs: minputs, + Timeout: req.Timeout, ResourceStatusAddress: req.ResourceStatusAddress, ResourceStatusToken: req.ResourceStatusToken, OldViews: oldViews, @@ -2078,6 +2079,7 @@ func (p *provider) Construct(ctx context.Context, req ConstructRequest) (Constru Create: ct.Create, Update: ct.Update, Delete: ct.Delete, + Read: ct.Read, } } diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/provider_server.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/provider_server.go index 10dd00924..198d150ce 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/provider_server.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/provider_server.go @@ -621,6 +621,7 @@ func (p *providerServer) Read(ctx context.Context, req *pulumirpc.ReadRequest) ( ID: requestID, Inputs: inputs, State: state, + Timeout: req.GetTimeout(), ResourceStatusAddress: req.GetResourceStatusAddress(), ResourceStatusToken: req.GetResourceStatusToken(), OldViews: oldViews, diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/resource_snippet.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/resource_snippet.go new file mode 100644 index 000000000..2bd1a33e0 --- /dev/null +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/resource_snippet.go @@ -0,0 +1,57 @@ +// Copyright 2026, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package resource + +import "github.com/blang/semver" + +// ParameterizationDescriptor is the serializable description of a dependency's parameterization. +type ParameterizationDescriptor struct { + // Name is the name of the package. + Name string `json:"name" yaml:"name"` + // Version is the version of the package. + Version semver.Version `json:"version" yaml:"version"` + // Value is the parameter value of the package. + Value []byte `json:"value" yaml:"value"` +} + +// PackageDescriptor is a descriptor for a package, this is similar to a plugin spec but also contains parameterization +// info. +type PackageDescriptor struct { + // Name is the simple name of the plugin. + Name string `json:"name" yaml:"name"` + // Version is the optional version of the plugin. + Version *semver.Version `json:"version,omitempty" yaml:"version,omitempty"` + // DownloadURL is the optional URL to use when downloading the provider plugin binary. + DownloadURL string `json:"downloadURL,omitempty" yaml:"downloadURL,omitempty"` + // Parameterization is the optional parameterization of the package. + Parameterization *ParameterizationDescriptor `json:"parameterization,omitempty" yaml:"parameterization,omitempty"` +} + +// Snippet represents a snippet of PCL that should be associated with a stack. The engine reruns these in deployments. +// +//nolint:lll +type Snippet struct { + // The logical name of the resource this snippet is for. + Name string `json:"name" yaml:"name"` + // The type of the resource this snippet is for. + Type string `json:"type" yaml:"type"` + // The PCL code for an expression for the body of this resource. + Code string `json:"code" yaml:"code"` + // The package descriptor for the resource + Descriptor PackageDescriptor `json:"descriptor" yaml:"descriptor"` + // References declares the external resources that this snippet's Code may refer to by HCL identifier. The map key + // is the identifier used inside Code; the value identifies the target resource by its URN. + References map[string]string `json:"references,omitempty" yaml:"references,omitempty"` +} diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/workspace/creds.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/workspace/creds.go index 181a39030..7f5c79a87 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/workspace/creds.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/workspace/creds.go @@ -105,7 +105,10 @@ func DeleteAccount(key string) error { if err != nil && !os.IsNotExist(err) { return err } - return StoreCredentials(deleteAccountFromCredentials(creds, key)) + if err = StoreCredentials(deleteAccountFromCredentials(creds, key)); err != nil { + return err + } + return deleteBackendConfig(key) } // deleteAccountFromCredentials removes a cloud URL from a credentials object @@ -129,10 +132,14 @@ func DeleteAllAccounts() error { return err } + var result error if err = os.Remove(credsFile); err != nil && !os.IsNotExist(err) { - return err + result = errors.Join(result, err) } - return nil + if err = deleteAllBackendConfig(); err != nil { + result = errors.Join(result, err) + } + return result } // StoreAccount saves the given account underneath the given key. @@ -806,6 +813,20 @@ func StoreAgentClaim(claim AgentClaim) error { // config file, deleting that file if no backend config remains. func deleteAgentBackendConfig(key string) error { configFile := getAgentConfigFilePathNoEnsure() + return deleteBackendConfigFromFile(configFile, key) +} + +// deleteBackendConfig removes backend config for key from the default config +// file, deleting that file if no backend config remains. +func deleteBackendConfig(key string) error { + configFile, err := getConfigFilePath() + if err != nil { + return err + } + return deleteBackendConfigFromFile(configFile, key) +} + +func deleteBackendConfigFromFile(configFile, key string) error { data, err := os.ReadFile(configFile) if err != nil { if os.IsNotExist(err) { @@ -828,6 +849,29 @@ func deleteAgentBackendConfig(key string) error { return writePulumiConfigFile(configFile, config) } +// deleteAllBackendConfig removes all backend configuration from the default +// config file. +func deleteAllBackendConfig() error { + configFile, err := getConfigFilePath() + if err != nil { + return err + } + data, err := os.ReadFile(configFile) + if err != nil { + if os.IsNotExist(err) { + return nil + } + return fmt.Errorf("reading '%s': %w", configFile, err) + } + + var config PulumiConfig + if err = json.Unmarshal(data, &config); err != nil { + return fmt.Errorf("failed to read Pulumi config file '%s': %w", configFile, err) + } + config.BackendConfig = nil + return writePulumiConfigFile(configFile, config) +} + type BackendConfig struct { DefaultOrg string `json:"defaultOrg,omitempty"` // The default org for this backend config. } diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/context.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/context.go index 50bbea7bb..c239ad40e 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/context.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/context.go @@ -410,6 +410,7 @@ func (ctx *Context) registerTransform(t ResourceTransform) (*pulumirpc.Callback, Create: rpcReq.Options.CustomTimeouts.Create, Update: rpcReq.Options.CustomTimeouts.Update, Delete: rpcReq.Options.CustomTimeouts.Delete, + Read: rpcReq.Options.CustomTimeouts.Read, } } if rpcReq.Options.DeleteBeforeReplace != nil { @@ -526,6 +527,7 @@ func (ctx *Context) registerTransform(t ResourceTransform) (*pulumirpc.Callback, Create: opts.CustomTimeouts.Create, Update: opts.CustomTimeouts.Update, Delete: opts.CustomTimeouts.Delete, + Read: opts.CustomTimeouts.Read, } } @@ -2032,6 +2034,9 @@ type resourceState struct { transformations []ResourceTransformation } +var errTransformationsCannotChangeParent = errors.New( + "transformations cannot currently be used to change the `parent` of a resource") + // Apply transformations and return the transformations themselves, as well as the transformed props and opts. func applyTransformations(t, name string, props Input, resource Resource, opts []ResourceOption, options *resourceOptions, @@ -2055,8 +2060,9 @@ func applyTransformations(t, name string, props Input, resource Resource, opts [ resOptions := merge(res.Opts...) if resOptions.Parent != nil && resOptions.Parent.URN() != options.Parent.URN() { - return nil, nil, nil, errors.New("transformations cannot currently be used to change the `parent` of a resource") + return nil, nil, nil, errTransformationsCannotChangeParent } + resOptions.Parent = options.Parent // Callers *must* re-apply the parent option, so we do it for them props = res.Props options = resOptions } @@ -2728,6 +2734,7 @@ func getTimeouts(custom *CustomTimeouts) *pulumirpc.RegisterResourceRequest_Cust timeouts.Update = custom.Update timeouts.Create = custom.Create timeouts.Delete = custom.Delete + timeouts.Read = custom.Read } return &timeouts } diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/provider.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/provider.go index 9649a0d2b..a368341f5 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/provider.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/provider.go @@ -187,6 +187,7 @@ func construct(ctx context.Context, req *pulumirpc.ConstructRequest, engineConn Create: t.GetCreate(), Update: t.GetUpdate(), Delete: t.GetDelete(), + Read: t.GetRead(), } } if len(req.GetReplaceWith()) > 0 { diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/resource.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/resource.go index ce60ad9ff..1b321a33a 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/resource.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/resource.go @@ -327,6 +327,7 @@ type CustomTimeouts struct { Create string Update string Delete string + Read string } // ResourceHookOptions are the options for registering a resource hook. diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/analyzer.pb.go b/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/analyzer.pb.go index 97e5db7d8..349775f0a 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/analyzer.pb.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/analyzer.pb.go @@ -1721,6 +1721,7 @@ type AnalyzerResourceOptions_CustomTimeouts struct { Create float64 `protobuf:"fixed64,1,opt,name=create,proto3" json:"create,omitempty"` // The create resource timeout in seconds. Update float64 `protobuf:"fixed64,2,opt,name=update,proto3" json:"update,omitempty"` // The update resource timeout in seconds. Delete float64 `protobuf:"fixed64,3,opt,name=delete,proto3" json:"delete,omitempty"` // The delete resource timeout in seconds. + Read float64 `protobuf:"fixed64,4,opt,name=read,proto3" json:"read,omitempty"` // The read resource timeout in seconds. unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1776,6 +1777,13 @@ func (x *AnalyzerResourceOptions_CustomTimeouts) GetDelete() float64 { return 0 } +func (x *AnalyzerResourceOptions_CustomTimeouts) GetRead() float64 { + if x != nil { + return x.Read + } + return 0 +} + var File_pulumi_analyzer_proto protoreflect.FileDescriptor const file_pulumi_analyzer_proto_rawDesc = "" + @@ -1826,7 +1834,7 @@ const file_pulumi_analyzer_proto_rawDesc = "" + "\x14propertyDependencies\x18\t \x03(\v25.pulumirpc.AnalyzerResource.PropertyDependenciesEntryR\x14propertyDependencies\x1ap\n" + "\x19PropertyDependenciesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12=\n" + - "\x05value\x18\x02 \x01(\v2'.pulumirpc.AnalyzerPropertyDependenciesR\x05value:\x028\x01\"\xec\x03\n" + + "\x05value\x18\x02 \x01(\v2'.pulumirpc.AnalyzerPropertyDependenciesR\x05value:\x028\x01\"\x80\x04\n" + "\x17AnalyzerResourceOptions\x12\x18\n" + "\aprotect\x18\x01 \x01(\bR\aprotect\x12$\n" + "\rignoreChanges\x18\x02 \x03(\tR\rignoreChanges\x120\n" + @@ -1835,11 +1843,12 @@ const file_pulumi_analyzer_proto_rawDesc = "" + "\x17additionalSecretOutputs\x18\x05 \x03(\tR\x17additionalSecretOutputs\x12\x18\n" + "\aaliases\x18\x06 \x03(\tR\aaliases\x12Y\n" + "\x0ecustomTimeouts\x18\a \x01(\v21.pulumirpc.AnalyzerResourceOptions.CustomTimeoutsR\x0ecustomTimeouts\x12\x16\n" + - "\x06parent\x18\b \x01(\tR\x06parent\x1aX\n" + + "\x06parent\x18\b \x01(\tR\x06parent\x1al\n" + "\x0eCustomTimeouts\x12\x16\n" + "\x06create\x18\x01 \x01(\x01R\x06create\x12\x16\n" + "\x06update\x18\x02 \x01(\x01R\x06update\x12\x16\n" + - "\x06delete\x18\x03 \x01(\x01R\x06delete\"\x8d\x01\n" + + "\x06delete\x18\x03 \x01(\x01R\x06delete\x12\x12\n" + + "\x04read\x18\x04 \x01(\x01R\x04read\"\x8d\x01\n" + "\x18AnalyzerProviderResource\x12\x12\n" + "\x04type\x18\x01 \x01(\tR\x04type\x127\n" + "\n" + diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/provider.pb.go b/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/provider.pb.go index d1a45a099..73e7beec3 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/provider.pb.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/provider.pb.go @@ -2043,7 +2043,9 @@ type ReadRequest struct { ResourceStatusToken string `protobuf:"bytes,8,opt,name=resource_status_token,json=resourceStatusToken,proto3" json:"resource_status_token,omitempty"` // The old views for the resource being read. These will only be populated when the // [](pulumirpc.ResourceProvider.Read) call is being made as part of a refresh operation. - OldViews []*View `protobuf:"bytes,9,rep,name=old_views,json=oldViews,proto3" json:"old_views,omitempty"` + OldViews []*View `protobuf:"bytes,9,rep,name=old_views,json=oldViews,proto3" json:"old_views,omitempty"` + // A timeout in seconds that the caller is prepared to wait for the operation to complete. + Timeout float64 `protobuf:"fixed64,10,opt,name=timeout,proto3" json:"timeout,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2141,6 +2143,13 @@ func (x *ReadRequest) GetOldViews() []*View { return nil } +func (x *ReadRequest) GetTimeout() float64 { + if x != nil { + return x.Timeout + } + return 0 +} + // `ReadResponse` is the type of responses sent by a [](pulumirpc.ResourceProvider.Read) call. A `ReadResponse` contains // the ID of the resource being read, as well as any state that was successfully read from the live environment. type ReadResponse struct { @@ -4034,7 +4043,10 @@ type ConstructRequest_CustomTimeouts struct { Update string `protobuf:"bytes,2,opt,name=update,proto3" json:"update,omitempty"` // How long a caller is prepared to wait for a nested resource's [](pulumirpc.ResourceProvider.Delete) operation // to complete. - Delete string `protobuf:"bytes,3,opt,name=delete,proto3" json:"delete,omitempty"` + Delete string `protobuf:"bytes,3,opt,name=delete,proto3" json:"delete,omitempty"` + // How long a caller is prepared to wait for a nested resource's [](pulumirpc.ResourceProvider.Read) operation + // to complete. + Read string `protobuf:"bytes,4,opt,name=read,proto3" json:"read,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -4090,6 +4102,13 @@ func (x *ConstructRequest_CustomTimeouts) GetDelete() string { return "" } +func (x *ConstructRequest_CustomTimeouts) GetRead() string { + if x != nil { + return x.Read + } + return "" +} + type ConstructRequest_ResourceHooksBinding struct { state protoimpl.MessageState `protogen:"open.v1"` BeforeCreate []string `protobuf:"bytes,1,rep,name=before_create,json=beforeCreate,proto3" json:"before_create,omitempty"` @@ -4416,7 +4435,7 @@ const file_pulumi_provider_proto_rawDesc = "" + "\n" + "properties\x18\x02 \x01(\v2\x17.google.protobuf.StructR\n" + "properties\x122\n" + - "\x15refresh_before_update\x18\x03 \x01(\bR\x13refreshBeforeUpdate\"\xdb\x02\n" + + "\x15refresh_before_update\x18\x03 \x01(\bR\x13refreshBeforeUpdate\"\xf5\x02\n" + "\vReadRequest\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x10\n" + "\x03urn\x18\x02 \x01(\tR\x03urn\x127\n" + @@ -4428,7 +4447,9 @@ const file_pulumi_provider_proto_rawDesc = "" + "\x04type\x18\x06 \x01(\tR\x04type\x126\n" + "\x17resource_status_address\x18\a \x01(\tR\x15resourceStatusAddress\x122\n" + "\x15resource_status_token\x18\b \x01(\tR\x13resourceStatusToken\x12,\n" + - "\told_views\x18\t \x03(\v2\x0f.pulumirpc.ViewR\boldViews\"\xbc\x01\n" + + "\told_views\x18\t \x03(\v2\x0f.pulumirpc.ViewR\boldViews\x12\x18\n" + + "\atimeout\x18\n" + + " \x01(\x01R\atimeout\"\xbc\x01\n" + "\fReadResponse\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x127\n" + "\n" + @@ -4490,7 +4511,7 @@ const file_pulumi_provider_proto_rawDesc = "" + "\x17resource_status_address\x18\b \x01(\tR\x15resourceStatusAddress\x122\n" + "\x15resource_status_token\x18\t \x01(\tR\x13resourceStatusToken\x12,\n" + "\told_views\x18\n" + - " \x03(\v2\x0f.pulumirpc.ViewR\boldViews\"\xa2\x10\n" + + " \x03(\v2\x0f.pulumirpc.ViewR\boldViews\"\xb6\x10\n" + "\x10ConstructRequest\x12\x18\n" + "\aproject\x18\x01 \x01(\tR\aproject\x12\x14\n" + "\x05stack\x18\x02 \x01(\tR\x05stack\x12?\n" + @@ -4523,11 +4544,12 @@ const file_pulumi_provider_proto_rawDesc = "" + "\aaliases\x18\x1d \x03(\v2\x10.pulumirpc.AliasR\aaliases\x12G\n" + "\x13replacement_trigger\x18\x1e \x01(\v2\x16.google.protobuf.ValueR\x12replacementTrigger\x1a*\n" + "\x14PropertyDependencies\x12\x12\n" + - "\x04urns\x18\x01 \x03(\tR\x04urns\x1aX\n" + + "\x04urns\x18\x01 \x03(\tR\x04urns\x1al\n" + "\x0eCustomTimeouts\x12\x16\n" + "\x06create\x18\x01 \x01(\tR\x06create\x12\x16\n" + "\x06update\x18\x02 \x01(\tR\x06update\x12\x16\n" + - "\x06delete\x18\x03 \x01(\tR\x06delete\x1a9\n" + + "\x06delete\x18\x03 \x01(\tR\x06delete\x12\x12\n" + + "\x04read\x18\x04 \x01(\tR\x04read\x1a9\n" + "\vConfigEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1av\n" + diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/resource.pb.go b/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/resource.pb.go index 94964c5cb..120704005 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/resource.pb.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/resource.pb.go @@ -2776,6 +2776,7 @@ type RegisterResourceRequest_CustomTimeouts struct { Create string `protobuf:"bytes,1,opt,name=create,proto3" json:"create,omitempty"` // The create resource timeout represented as a string e.g. 5m. Update string `protobuf:"bytes,2,opt,name=update,proto3" json:"update,omitempty"` // The update resource timeout represented as a string e.g. 5m. Delete string `protobuf:"bytes,3,opt,name=delete,proto3" json:"delete,omitempty"` // The delete resource timeout represented as a string e.g. 5m. + Read string `protobuf:"bytes,4,opt,name=read,proto3" json:"read,omitempty"` // The read resource timeout represented as a string e.g. 5m. unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2831,6 +2832,13 @@ func (x *RegisterResourceRequest_CustomTimeouts) GetDelete() string { return "" } +func (x *RegisterResourceRequest_CustomTimeouts) GetRead() string { + if x != nil { + return x.Read + } + return "" +} + type RegisterResourceRequest_ResourceHooksBinding struct { state protoimpl.MessageState `protogen:"open.v1"` BeforeCreate []string `protobuf:"bytes,1,rep,name=before_create,json=beforeCreate,proto3" json:"before_create,omitempty"` @@ -3068,7 +3076,7 @@ const file_pulumi_resource_proto_rawDesc = "" + "\x03urn\x18\x01 \x01(\tR\x03urn\x127\n" + "\n" + "properties\x18\x02 \x01(\v2\x17.google.protobuf.StructR\n" + - "properties\"\xbd\x15\n" + + "properties\"\xd1\x15\n" + "\x17RegisterResourceRequest\x12\x12\n" + "\x04type\x18\x01 \x01(\tR\x04type\x12\x12\n" + "\x04name\x18\x02 \x01(\tR\x04name\x12\x16\n" + @@ -3120,11 +3128,12 @@ const file_pulumi_resource_proto_rawDesc = "" + "\thideDiffs\x18% \x03(\tR\thideDiffs\x12^\n" + "\x0eenvVarMappings\x18) \x03(\v26.pulumirpc.RegisterResourceRequest.EnvVarMappingsEntryR\x0eenvVarMappings\x1a*\n" + "\x14PropertyDependencies\x12\x12\n" + - "\x04urns\x18\x01 \x03(\tR\x04urns\x1aX\n" + + "\x04urns\x18\x01 \x03(\tR\x04urns\x1al\n" + "\x0eCustomTimeouts\x12\x16\n" + "\x06create\x18\x01 \x01(\tR\x06create\x12\x16\n" + "\x06update\x18\x02 \x01(\tR\x06update\x12\x16\n" + - "\x06delete\x18\x03 \x01(\tR\x06delete\x1a\x80\x01\n" + + "\x06delete\x18\x03 \x01(\tR\x06delete\x12\x12\n" + + "\x04read\x18\x04 \x01(\tR\x04read\x1a\x80\x01\n" + "\x19PropertyDependenciesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12M\n" + "\x05value\x18\x02 \x01(\v27.pulumirpc.RegisterResourceRequest.PropertyDependenciesR\x05value:\x028\x01\x1a<\n" + diff --git a/vendor/github.com/sahilm/fuzzy/fuzzy.go b/vendor/github.com/sahilm/fuzzy/fuzzy.go index 54eb98fb2..38853103a 100644 --- a/vendor/github.com/sahilm/fuzzy/fuzzy.go +++ b/vendor/github.com/sahilm/fuzzy/fuzzy.go @@ -6,6 +6,7 @@ VSCode, IntelliJ IDEA et al. package fuzzy import ( + "iter" "sort" "strings" "unicode" @@ -60,6 +61,16 @@ func (ss stringSource) String(i int) string { func (ss stringSource) Len() int { return len(ss) } +func iterFromSource(s Source) iter.Seq[string] { + return func(yield func(string) bool) { + for i := 0; i < s.Len(); i++ { + if !yield(s.String(i)) { + return + } + } + } +} + /* Find looks up pattern in data and returns matches in descending order of match quality. Match quality @@ -107,15 +118,33 @@ FindFromNoSort is an alternative FindFrom implementation that does not sort results in the end. */ func FindFromNoSort(pattern string, data Source) Matches { + return FindFromIterNoSort(pattern, iterFromSource(data)) +} + +/* +FindFromIter is an alternative implementation of FindFrom that uses an iterator +instead of Source. +*/ +func FindFromIter(pattern string, it iter.Seq[string]) Matches { + matches := FindFromIterNoSort(pattern, it) + sort.Stable(matches) + return matches +} + +/* +FindFromIterNoSort is an alternative implementation of FindFromIter that does +not sort results in the end. +*/ +func FindFromIterNoSort(pattern string, it iter.Seq[string]) Matches { if len(pattern) == 0 { return nil } runes := []rune(pattern) var matches Matches var matchedIndexes []int - for i := 0; i < data.Len(); i++ { + var i int + for matchStr := range it { var match Match - matchStr := data.String(i) match.Str = matchStr // Limit matching to the first NUL rune, if any. We could maybe replace it // with whitespace, but this way doesn't allocate so much, and the presence @@ -125,6 +154,7 @@ func FindFromNoSort(pattern string, data Source) Matches { cleanMatchStr = cleanMatchStr[:nullI] } match.Index = i + i++ if matchedIndexes != nil { match.MatchedIndexes = matchedIndexes } else { diff --git a/vendor/golang.org/x/sync/errgroup/errgroup.go b/vendor/golang.org/x/sync/errgroup/errgroup.go index f69fd7546..c261a8ebb 100644 --- a/vendor/golang.org/x/sync/errgroup/errgroup.go +++ b/vendor/golang.org/x/sync/errgroup/errgroup.go @@ -109,7 +109,7 @@ func (g *Group) TryGo(f func() error) bool { if g.sem != nil { select { case g.sem <- token{}: - // Note: this allows barging iff channels in general allow barging. + // Note: this allows barging if and only if channels in general allow barging. default: return false } diff --git a/vendor/modules.txt b/vendor/modules.txt index 8e50b7013..ebbb1358d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -175,7 +175,7 @@ github.com/IBM-Cloud/power-go-client/power/models # github.com/IBM/go-sdk-core/v5 v5.21.4 ## explicit; go 1.25.0 github.com/IBM/go-sdk-core/v5/core -# github.com/IBM/platform-services-go-sdk v0.99.0 +# github.com/IBM/platform-services-go-sdk v0.99.2 ## explicit; go 1.25.0 github.com/IBM/platform-services-go-sdk/common github.com/IBM/platform-services-go-sdk/resourcecontrollerv2 @@ -232,7 +232,7 @@ github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector/outputs github.com/aws/amazon-ec2-instance-selector/v3/pkg/sorter -# github.com/aws/aws-sdk-go-v2 v1.41.12 +# github.com/aws/aws-sdk-go-v2 v1.42.0 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/aws github.com/aws/aws-sdk-go-v2/aws/arn @@ -263,11 +263,11 @@ github.com/aws/aws-sdk-go-v2/internal/timeconv ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi -# github.com/aws/aws-sdk-go-v2/config v1.32.20 +# github.com/aws/aws-sdk-go-v2/config v1.32.25 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/config github.com/aws/aws-sdk-go-v2/config/internal/ini -# github.com/aws/aws-sdk-go-v2/credentials v1.19.19 +# github.com/aws/aws-sdk-go-v2/credentials v1.19.24 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/credentials github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds @@ -277,17 +277,17 @@ github.com/aws/aws-sdk-go-v2/credentials/logincreds github.com/aws/aws-sdk-go-v2/credentials/processcreds github.com/aws/aws-sdk-go-v2/credentials/ssocreds github.com/aws/aws-sdk-go-v2/credentials/stscreds -# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.25 +# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29 ## explicit; go 1.24 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.4.28 +# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.28 +# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 -# github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.29 +# github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/v4a github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto @@ -304,7 +304,7 @@ github.com/aws/aws-sdk-go-v2/service/ecs/document github.com/aws/aws-sdk-go-v2/service/ecs/internal/document github.com/aws/aws-sdk-go-v2/service/ecs/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ecs/types -# github.com/aws/aws-sdk-go-v2/service/iam v1.54.3 +# github.com/aws/aws-sdk-go-v2/service/iam v1.54.5 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/iam github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints @@ -312,18 +312,18 @@ github.com/aws/aws-sdk-go-v2/service/iam/types # github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding -# github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.21 +# github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/internal/checksum -# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.28 +# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url -# github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.28 +# github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29 ## explicit; go 1.24 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/pricing v1.42.2 +# github.com/aws/aws-sdk-go-v2/service/pricing v1.42.7 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/pricing github.com/aws/aws-sdk-go-v2/service/pricing/internal/endpoints @@ -335,22 +335,22 @@ github.com/aws/aws-sdk-go-v2/service/s3/internal/arn github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints github.com/aws/aws-sdk-go-v2/service/s3/types -# github.com/aws/aws-sdk-go-v2/service/signin v1.1.1 +# github.com/aws/aws-sdk-go-v2/service/signin v1.2.0 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/signin github.com/aws/aws-sdk-go-v2/service/signin/internal/endpoints github.com/aws/aws-sdk-go-v2/service/signin/types -# github.com/aws/aws-sdk-go-v2/service/sso v1.31.2 +# github.com/aws/aws-sdk-go-v2/service/sso v1.31.3 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/sso github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sso/types -# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.2 +# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/ssooidc github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ssooidc/types -# github.com/aws/aws-sdk-go-v2/service/sts v1.43.2 +# github.com/aws/aws-sdk-go-v2/service/sts v1.43.3 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints @@ -445,8 +445,8 @@ github.com/clipperhouse/displaywidth # github.com/clipperhouse/uax29/v2 v2.7.0 ## explicit; go 1.18 github.com/clipperhouse/uax29/v2/graphemes -# github.com/cloudflare/circl v1.6.3 -## explicit; go 1.22.0 +# github.com/cloudflare/circl v1.6.4 +## explicit; go 1.24.0 github.com/cloudflare/circl/dh/x25519 github.com/cloudflare/circl/dh/x448 github.com/cloudflare/circl/ecc/goldilocks @@ -594,7 +594,7 @@ github.com/go-openapi/jsonreference/internal # github.com/go-openapi/loads v0.24.0 ## explicit; go 1.25.0 github.com/go-openapi/loads -# github.com/go-openapi/runtime v0.32.2 +# github.com/go-openapi/runtime v0.32.4 ## explicit; go 1.25.0 github.com/go-openapi/runtime github.com/go-openapi/runtime/client @@ -605,29 +605,29 @@ github.com/go-openapi/runtime/middleware/denco github.com/go-openapi/runtime/middleware/untyped github.com/go-openapi/runtime/security github.com/go-openapi/runtime/yamlpc -# github.com/go-openapi/runtime/server-middleware v0.32.2 +# github.com/go-openapi/runtime/server-middleware v0.32.4 ## explicit; go 1.25.0 github.com/go-openapi/runtime/server-middleware/docui github.com/go-openapi/runtime/server-middleware/mediatype github.com/go-openapi/runtime/server-middleware/negotiate github.com/go-openapi/runtime/server-middleware/negotiate/header -# github.com/go-openapi/spec v0.22.5 +# github.com/go-openapi/spec v0.22.6 ## explicit; go 1.25.0 github.com/go-openapi/spec # github.com/go-openapi/strfmt v0.26.3 ## explicit; go 1.25.0 github.com/go-openapi/strfmt github.com/go-openapi/strfmt/internal/bsonlite -# github.com/go-openapi/swag v0.26.0 +# github.com/go-openapi/swag v0.26.1 ## explicit; go 1.25.0 github.com/go-openapi/swag -# github.com/go-openapi/swag/cmdutils v0.26.0 +# github.com/go-openapi/swag/cmdutils v0.26.1 ## explicit; go 1.25.0 github.com/go-openapi/swag/cmdutils # github.com/go-openapi/swag/conv v0.26.1 ## explicit; go 1.25.0 github.com/go-openapi/swag/conv -# github.com/go-openapi/swag/fileutils v0.26.0 +# github.com/go-openapi/swag/fileutils v0.26.1 ## explicit; go 1.25.0 github.com/go-openapi/swag/fileutils # github.com/go-openapi/swag/jsonname v0.26.1 @@ -657,7 +657,7 @@ github.com/go-openapi/swag/typeutils # github.com/go-openapi/swag/yamlutils v0.26.1 ## explicit; go 1.25.0 github.com/go-openapi/swag/yamlutils -# github.com/go-openapi/validate v0.25.3 +# github.com/go-openapi/validate v0.26.0 ## explicit; go 1.25.0 github.com/go-openapi/validate # github.com/go-playground/locales v0.14.1 @@ -923,7 +923,7 @@ github.com/pulumi/pulumi-azure-native-sdk/v3/utilities ## explicit; go 1.24.7 github.com/pulumi/pulumi-command/sdk/go/command/internal github.com/pulumi/pulumi-command/sdk/go/command/remote -# github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.18 +# github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.19 ## explicit; go 1.25.8 github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal @@ -931,7 +931,7 @@ github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal ## explicit; go 1.21 github.com/pulumi/pulumi-docker/sdk/v4/go/docker github.com/pulumi/pulumi-docker/sdk/v4/go/docker/internal -# github.com/pulumi/pulumi-gitlab/sdk/v9 v9.11.0 +# github.com/pulumi/pulumi-gitlab/sdk/v9 v9.11.1 ## explicit; go 1.25.8 github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab/internal @@ -1014,7 +1014,7 @@ github.com/pulumi/pulumi-random/sdk/v4/go/random/internal ## explicit; go 1.25.8 github.com/pulumi/pulumi-tls/sdk/v5/go/tls github.com/pulumi/pulumi-tls/sdk/v5/go/tls/internal -# github.com/pulumi/pulumi/sdk/v3 v3.245.0 +# github.com/pulumi/pulumi/sdk/v3 v3.246.0 ## explicit; go 1.25.8 github.com/pulumi/pulumi/sdk/v3 github.com/pulumi/pulumi/sdk/v3/go/auto @@ -1103,7 +1103,7 @@ github.com/rogpeppe/go-internal/lockedfile/internal/filelock ## explicit; go 1.23.0 github.com/sagikazarmark/locafero github.com/sagikazarmark/locafero/internal/queue -# github.com/sahilm/fuzzy v0.1.2 +# github.com/sahilm/fuzzy v0.1.3 ## explicit; go 1.24.5 github.com/sahilm/fuzzy # github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 @@ -1315,7 +1315,7 @@ golang.org/x/net/trace ## explicit; go 1.25.0 golang.org/x/oauth2 golang.org/x/oauth2/internal -# golang.org/x/sync v0.20.0 +# golang.org/x/sync v0.21.0 ## explicit; go 1.25.0 golang.org/x/sync/errgroup # golang.org/x/sys v0.45.0 @@ -1504,7 +1504,7 @@ gopkg.in/warnings.v0 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 -# k8s.io/apimachinery v0.36.1 +# k8s.io/apimachinery v0.36.2 ## explicit; go 1.26.0 k8s.io/apimachinery/pkg/api/errors k8s.io/apimachinery/pkg/api/meta @@ -1547,7 +1547,7 @@ k8s.io/apimachinery/pkg/util/yaml k8s.io/apimachinery/pkg/version k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/client-go v0.36.1 +# k8s.io/client-go v0.36.2 ## explicit; go 1.26.0 k8s.io/client-go/dynamic k8s.io/client-go/features @@ -1614,4 +1614,4 @@ sigs.k8s.io/yaml sigs.k8s.io/yaml/goyaml.v2 # github.com/charmbracelet/bubbles/v2 => charm.land/bubbles/v2 v2.1.0 # github.com/charmbracelet/bubbletea/v2 => charm.land/bubbletea/v2 v2.0.7 -# github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.3 +# github.com/charmbracelet/lipgloss/v2 => charm.land/lipgloss/v2 v2.0.4