diff --git a/Makefile b/Makefile index c895cdb85..8ba59a398 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,9 @@ TKN_IMG ?= quay.io/redhat-developer/mapt:v${VERSION}-tkn # Integrations # renovate: datasource=github-releases depName=cirruslabs/cirrus-cli -CIRRUS_CLI ?= v0.159.1 +CIRRUS_CLI ?= v0.160.0 # renovate: datasource=github-releases depName=actions/runner -GITHUB_RUNNER ?= 2.330.0 +GITHUB_RUNNER ?= 2.331.0 # Go and compilation related variables GOPATH ?= $(shell go env GOPATH) diff --git a/go.mod b/go.mod index 7910ec7db..a23343fa2 100644 --- a/go.mod +++ b/go.mod @@ -5,14 +5,14 @@ go 1.24.7 require ( github.com/coocood/freecache v1.2.4 github.com/pulumi/pulumi-command/sdk v1.1.3 - github.com/pulumi/pulumi-random/sdk/v4 v4.18.5 - github.com/pulumi/pulumi/sdk/v3 v3.215.0 + github.com/pulumi/pulumi-random/sdk/v4 v4.19.0 + github.com/pulumi/pulumi/sdk/v3 v3.216.0 github.com/sirupsen/logrus v1.9.4 github.com/spf13/cobra v1.10.2 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v7 v7.2.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.9.0 @@ -23,8 +23,8 @@ require ( github.com/aws/aws-sdk-go-v2/service/ec2 v1.279.2 github.com/aws/aws-sdk-go-v2/service/s3 v1.95.1 github.com/aws/aws-sdk-go-v2/service/sts v1.41.6 - github.com/pulumi/pulumi-aws-native/sdk v1.47.0 - github.com/pulumi/pulumi-aws/sdk/v7 v7.15.0 + github.com/pulumi/pulumi-aws-native/sdk v1.49.0 + github.com/pulumi/pulumi-aws/sdk/v7 v7.16.0 github.com/pulumi/pulumi-awsx/sdk/v3 v3.1.0 github.com/pulumi/pulumi-azure-native-sdk/authorization/v3 v3.12.1 github.com/pulumi/pulumi-azure-native-sdk/compute/v3 v3.12.1 @@ -34,7 +34,7 @@ require ( github.com/pulumi/pulumi-azure-native-sdk/resources/v3 v3.12.1 github.com/pulumi/pulumi-azure-native-sdk/storage/v3 v3.12.1 github.com/pulumi/pulumi-tls/sdk/v5 v5.2.3 - golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93 + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 ) require ( @@ -61,8 +61,8 @@ require ( github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/sahilm/fuzzy v0.1.1 // indirect - golang.org/x/mod v0.31.0 // indirect - golang.org/x/tools v0.40.0 // indirect + golang.org/x/mod v0.32.0 // indirect + golang.org/x/tools v0.41.0 // indirect ) require ( @@ -102,7 +102,7 @@ require ( github.com/cyphar/filepath-securejoin v0.6.1 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-viper/mapstructure/v2 v2.4.0 // indirect + github.com/go-viper/mapstructure/v2 v2.5.0 // indirect github.com/golang-jwt/jwt/v5 v5.3.0 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect github.com/google/uuid v1.6.0 // indirect @@ -134,7 +134,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/sync v0.19.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -142,7 +142,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions v1.3.0 github.com/Microsoft/go-winio v0.6.2 // indirect github.com/ProtonMail/go-crypto v1.3.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ecs v1.70.1 + github.com/aws/aws-sdk-go-v2/service/ecs v1.71.0 github.com/aws/aws-sdk-go-v2/service/iam v1.53.2 github.com/blang/semver v3.5.1+incompatible // indirect github.com/cheggaaa/pb v1.0.29 // indirect @@ -167,7 +167,7 @@ require ( github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pkg/term v1.1.0 // indirect - github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.24.1 + github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.25.0 github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/sergi/go-diff v1.4.0 // indirect @@ -178,11 +178,11 @@ require ( github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect go.uber.org/atomic v1.11.0 // indirect - golang.org/x/crypto v0.46.0 // indirect - golang.org/x/net v0.48.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/net v0.49.0 // indirect golang.org/x/sys v0.40.0 // indirect - golang.org/x/term v0.38.0 // indirect - golang.org/x/text v0.32.0 // indirect + golang.org/x/term v0.39.0 // indirect + golang.org/x/text v0.33.0 // indirect google.golang.org/grpc v1.78.0 // indirect google.golang.org/protobuf v1.36.11 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect diff --git a/go.sum b/go.sum index e8a73bc36..5d8a92972 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0 h1:JXg2dwJUmPB9JmtVmdEB16APJ7jurfbY5jnfXpJoRMc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0/go.mod h1:YD5h/ldMsG0XiIw7PdyNhLxaM317eFh5yNLccNfGdyw= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0 h1:fou+2+WFTib47nS+nz/ozhEBnvU96bKHy6LjRsY4E28= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0/go.mod h1:t76Ruy8AHvUAC8GfMWJMa0ElSbuIcO03NLpynfbgsPA= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 h1:Hk5QBxZQC1jb2Fwj6mpzme37xbCDdNTxU7O9eb5+LB4= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1/go.mod h1:IYus9qsFobWIc2YVwe/WPjcnyCkPKtnHAqUYeebc8z0= github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY= @@ -71,8 +71,8 @@ github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.17 h1:JqcdRG//czea7Ppjb+g/n4o8i/R github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.17/go.mod h1:CO+WeGmIdj/MlPel2KwID9Gt7CNq4M65HUfBW97liM0= github.com/aws/aws-sdk-go-v2/service/ec2 v1.279.2 h1:MG12Z/W1zzJLkw2gCU2gKZ872rqLM0pi9LdkZ/z3FHc= github.com/aws/aws-sdk-go-v2/service/ec2 v1.279.2/go.mod h1:Uy+C+Sc58jozdoL1McQr8bDsEvNFx+/nBY+vpO1HVUY= -github.com/aws/aws-sdk-go-v2/service/ecs v1.70.1 h1:3USGpUZbK84ZuMh5vdFj/I5W+N4DrarfASdrjVBETvc= -github.com/aws/aws-sdk-go-v2/service/ecs v1.70.1/go.mod h1:pMlGFDpHoLTJOIZHGdJOAWmi+xeIlQXuFTuQxs1epYE= +github.com/aws/aws-sdk-go-v2/service/ecs v1.71.0 h1:MzP/ElwTpINq+hS80ZQz4epKVnUTlz8Sz+P/AFORCKM= +github.com/aws/aws-sdk-go-v2/service/ecs v1.71.0/go.mod h1:pMlGFDpHoLTJOIZHGdJOAWmi+xeIlQXuFTuQxs1epYE= github.com/aws/aws-sdk-go-v2/service/iam v1.53.2 h1:62G6btFUwAa5uR5iPlnlNVAM0zJSLbWgDfKOfUC7oW4= github.com/aws/aws-sdk-go-v2/service/iam v1.53.2/go.mod h1:av9clChrbZbJ5E21msSsiT2oghl2BJHfQGhCkXmhyu8= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.4 h1:0ryTNEdJbzUCEWkVXEXoqlXV72J5keC1GvILMOuD00E= @@ -185,8 +185,8 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= -github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= -github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= +github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -300,10 +300,10 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.21.0 h1:TR8Ff22SU+z8cooTmUKkmk2FltXW/wDPrIwI9BP88Vk= github.com/pulumi/esc v0.21.0/go.mod h1:mkghIFn/TvN3XnP4jmCB4U5BG1I4UjGluARi39ckrCE= -github.com/pulumi/pulumi-aws-native/sdk v1.47.0 h1:4CVeLZFGsgx+yWTaRxBDVdqRtjf5tpe+JFqe0xugsn0= -github.com/pulumi/pulumi-aws-native/sdk v1.47.0/go.mod h1:gmgSOTrjC7wArS3etY/n8vcEvDF56AQenP8YSH9tlII= -github.com/pulumi/pulumi-aws/sdk/v7 v7.15.0 h1:6Ae7ZU+xmXhYN8KDitJdnv3hojogvurm5D5IbjQIeBw= -github.com/pulumi/pulumi-aws/sdk/v7 v7.15.0/go.mod h1:hsOxQjCl7ASsYWRVC8UtbFaR+xx9S0QwNFnbo0Kzg1I= +github.com/pulumi/pulumi-aws-native/sdk v1.49.0 h1:deKMCP1coynLvpLXEeAO895+KaxyWxk3Yb6iiJ1y0fQ= +github.com/pulumi/pulumi-aws-native/sdk v1.49.0/go.mod h1:gmgSOTrjC7wArS3etY/n8vcEvDF56AQenP8YSH9tlII= +github.com/pulumi/pulumi-aws/sdk/v7 v7.16.0 h1:SYHQ/Zoru+jpUSbZb/s/DH5AA1yk4DUQwPzor+NIu3k= +github.com/pulumi/pulumi-aws/sdk/v7 v7.16.0/go.mod h1:RUG8URNfkq/lmBQa2+oIFoASIXAJbGwciBCL5m+JwmI= github.com/pulumi/pulumi-awsx/sdk/v3 v3.1.0 h1:jphjwZoSnNyW4d3dpS++T+TlZFTy6vb9gJt33u6xf14= github.com/pulumi/pulumi-awsx/sdk/v3 v3.1.0/go.mod h1:ALZ8aBuwNtHkhFCY019gJOfgo7q2WYlsL1kM+0apbEA= github.com/pulumi/pulumi-azure-native-sdk/authorization/v3 v3.12.1 h1:qtbhrj52T0+MMzun7B3kjoWLCyhFt3Gtu/qyBf7wRBU= @@ -328,14 +328,14 @@ github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.15 h1:K6F/3o44gGj+ github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild v0.0.15/go.mod h1:cZyHs6q34kbQZJYaBjWUJhPsgwUFoL6xyjo7sRqBcv4= github.com/pulumi/pulumi-docker/sdk/v4 v4.11.0 h1:I8nJlJcQQiMs0njR1/CvXWk2y0dzhwSXIW62xuVaZQc= github.com/pulumi/pulumi-docker/sdk/v4 v4.11.0/go.mod h1:TbjBDNYFkMGmDZdrV6grRy+7AADkGLTcPjLHY9gh8dg= -github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.24.1 h1:L1J2/PHgAziDXUvOWJ4HH1JBlgxzpQseZiEIu4K2x34= -github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.24.1/go.mod h1:vNiMC/N8GNHvDwU3gQRXQ6V+kbgSl5N/lKtfrUjGuXU= -github.com/pulumi/pulumi-random/sdk/v4 v4.18.5 h1:vNVS8u0VhNmxZDL7Qmr6gVff7zjVQeU+fFfAysfNgYc= -github.com/pulumi/pulumi-random/sdk/v4 v4.18.5/go.mod h1:AJpJvPU3qJaq02VUui3rMZHchvVpTvVuVp0lbCeEE50= +github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.25.0 h1:N1qitmrGomEaCPsblqJHaw8Re0cqqox5V+kHsi4EEtk= +github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.25.0/go.mod h1:ACBJF6+nzUqDeRK+p2OrvykunyeHfvtbyELc6PB38fk= +github.com/pulumi/pulumi-random/sdk/v4 v4.19.0 h1:VnfyLqRhhv8OdP9GRtynXxOqwT/x1VinsSxAGibrIpA= +github.com/pulumi/pulumi-random/sdk/v4 v4.19.0/go.mod h1:AJpJvPU3qJaq02VUui3rMZHchvVpTvVuVp0lbCeEE50= github.com/pulumi/pulumi-tls/sdk/v5 v5.2.3 h1:HEHeifaSKme+mWXYkps5qYD45JJc86Y/0awBj7UC6vU= github.com/pulumi/pulumi-tls/sdk/v5 v5.2.3/go.mod h1:UxIBAyqaLIo5bn63paPM7FU7DahbfeSIKbgTf9KldLY= -github.com/pulumi/pulumi/sdk/v3 v3.215.0 h1:XZMiv9aSE1pD3kW4JpA53cy7mFflbJYn1fFKH1NMIAY= -github.com/pulumi/pulumi/sdk/v3 v3.215.0/go.mod h1:Bn5Z9Rzp1lPqdAccaB+F2ivUBiamEl2TNR3Gg/h7iLs= +github.com/pulumi/pulumi/sdk/v3 v3.216.0 h1:8CkcMeg/fUI+nOp0cM4XJQIn1X0Q0CeOu6ZUv9pw17A= +github.com/pulumi/pulumi/sdk/v3 v3.216.0/go.mod h1:9bgwXx4+QuVuIBgivyiVY/f4X16DgMm9gGHgAcbPxk0= 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= @@ -416,24 +416,24 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU= -golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= -golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93 h1:fQsdNF2N+/YewlRZiricy4P1iimyPKZ/xwniHj8Q2a0= -golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93/go.mod h1:EPRbTFwzwjXj9NpYyyrvenVh9Y+GFeEvMNh7Xuz7xgU= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= +golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.31.0 h1:HaW9xtz0+kOcWKwli0ZXy79Ix+UW/vOfmWI5QVd2tgI= -golang.org/x/mod v0.31.0/go.mod h1:43JraMp9cGx1Rx3AqioxrbrhNsLl2l/iNAvuBkrezpg= +golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= +golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= 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= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= -golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= 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= @@ -459,29 +459,29 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q= -golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg= +golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY= +golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= -golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA= -golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc= +golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= +golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b h1:Mv8VFug0MP9e5vUxfBcE3vUkV6CImK3cMNMIDFjmzxU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 h1:C4WAdL+FbjnGlpp2S+HMVhBeCq2Lcib4xZqfPNF6OoQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= diff --git a/oci/Containerfile b/oci/Containerfile index 4533ba32d..372dd0c57 100644 --- a/oci/Containerfile +++ b/oci/Containerfile @@ -1,12 +1,12 @@ -FROM registry.access.redhat.com/ubi9/go-toolset@sha256:38d909b4f0b5244bc6dffab499fa3324e2ce878dcc79e3ee85a200655cbba736 as builder +FROM registry.access.redhat.com/ubi9/go-toolset@sha256:e8938564f866174a6d79e55dfe577c2ed184b1f53e91d782173fb69b07ce69ef as builder ARG TARGETARCH USER root WORKDIR /workspace COPY . . # renovate: datasource=github-releases depName=pulumi/pulumi -ENV PULUMI_VERSION 3.215.0 +ENV PULUMI_VERSION 3.216.0 ENV PULUMI_BASE_URL="https://github.com/pulumi/pulumi/releases/download/v${PULUMI_VERSION}/pulumi-v${PULUMI_VERSION}" ENV PULUMI_URL="${PULUMI_BASE_URL}-linux-x64.tar.gz" @@ -19,7 +19,7 @@ RUN unset VERSION \ && tar -xzvf pulumicli.tar.gz # ubi 9.5-1732804088 -FROM registry.access.redhat.com/ubi9/ubi@sha256:2c9bb68a869abf7d7417f6639509ab5eb8500d8429ea11ab59e677be5545162b +FROM registry.access.redhat.com/ubi9/ubi@sha256:22e95731596d661ff08daabaa5ef751b20ac42d0a58492dac5efa7373f471389 ARG TARGETARCH LABEL org.opencontainers.image.authors="Redhat Developer" @@ -32,7 +32,7 @@ ENV AWS_SDK_LOAD_CONFIG=1 \ # Pulumi plugins # renovate: datasource=github-releases depName=pulumi/pulumi-aws -ARG PULUMI_AWS_VERSION=v7.15.0 +ARG PULUMI_AWS_VERSION=v7.16.0 # renovate: datasource=github-releases depName=pulumi/pulumi-awsx ARG PULUMI_AWSX_VERSION=v3.1.0 # renovate: datasource=github-releases depName=pulumi/pulumi-azure-native @@ -42,9 +42,9 @@ ARG PULUMI_COMMAND_VERSION=v1.1.3 # renovate: datasource=github-releases depName=pulumi/pulumi-tls ARG PULUMI_TLS_VERSION=v5.2.3 # renovate: datasource=github-releases depName=pulumi/pulumi-random -ARG PULUMI_RANDOM_VERSION=v4.18.5 +ARG PULUMI_RANDOM_VERSION=v4.19.0 # renovate: datasource=github-releases depName=pulumi/pulumi-aws-native -ARG PULUMI_AWS_NATIVE_VERSION=v1.47.0 +ARG PULUMI_AWS_NATIVE_VERSION=v1.49.0 ENV PULUMI_HOME "/opt/mapt/run" WORKDIR ${PULUMI_HOME} diff --git a/tools/go.mod b/tools/go.mod index d7381860c..3fbdaba52 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -22,7 +22,7 @@ require ( dev.gaijin.team/go/exhaustruct/v4 v4.0.0 // indirect dev.gaijin.team/go/golib v0.8.1 // indirect github.com/AdminBenni/iota-mixing v1.0.0 // indirect - github.com/MirrexOne/unqueryvet v1.4.0 // indirect + github.com/MirrexOne/unqueryvet v1.5.1 // indirect github.com/alfatraining/structtag v1.0.0 // indirect github.com/clipperhouse/uax29/v2 v2.3.1 // indirect github.com/godoc-lint/godoc-lint v0.11.1 // indirect @@ -47,7 +47,7 @@ require ( github.com/Djarvur/go-err113 v0.1.1 // indirect github.com/Masterminds/semver/v3 v3.4.0 // indirect github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect - github.com/alecthomas/chroma/v2 v2.21.1 // indirect + github.com/alecthomas/chroma/v2 v2.23.0 // indirect github.com/alecthomas/go-check-sumtype v0.3.1 // indirect github.com/alexkohler/nakedret/v2 v2.0.6 // indirect github.com/alexkohler/prealloc v1.0.2 // indirect @@ -94,7 +94,7 @@ require ( github.com/go-toolsmith/astp v1.1.0 // indirect github.com/go-toolsmith/strparse v1.1.0 // indirect github.com/go-toolsmith/typep v1.1.0 // indirect - github.com/go-viper/mapstructure/v2 v2.4.0 // indirect + github.com/go-viper/mapstructure/v2 v2.5.0 // indirect github.com/go-xmlfmt/xmlfmt v1.1.3 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gofrs/flock v0.13.0 // indirect @@ -209,12 +209,12 @@ require ( go.uber.org/automaxprocs v1.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.1 // indirect - golang.org/x/exp/typeparams v0.0.0-20251219203646-944ab1f22d93 // indirect - golang.org/x/mod v0.31.0 // indirect + golang.org/x/exp/typeparams v0.0.0-20260112195511-716be5621a96 // indirect + golang.org/x/mod v0.32.0 // indirect golang.org/x/sync v0.19.0 // indirect golang.org/x/sys v0.40.0 // indirect - golang.org/x/text v0.32.0 // indirect - golang.org/x/tools v0.40.0 // indirect + golang.org/x/text v0.33.0 // indirect + golang.org/x/tools v0.41.0 // indirect google.golang.org/protobuf v1.36.11 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect honnef.co/go/tools v0.6.1 // indirect diff --git a/tools/go.sum b/tools/go.sum index 39dbcb48d..a3ccdddae 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -30,14 +30,14 @@ github.com/Djarvur/go-err113 v0.1.1 h1:eHfopDqXRwAi+YmCUas75ZE0+hoBHJ2GQNLYRSxao github.com/Djarvur/go-err113 v0.1.1/go.mod h1:IaWJdYFLg76t2ihfflPZnM1LIQszWOsFDh2hhhAVF6k= github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= -github.com/MirrexOne/unqueryvet v1.4.0 h1:6KAkqqW2KUnkl9Z0VuTphC3IXRPoFqEkJEtyxxHj5eQ= -github.com/MirrexOne/unqueryvet v1.4.0/go.mod h1:IWwCwMQlSWjAIteW0t+28Q5vouyktfujzYznSIWiuOg= +github.com/MirrexOne/unqueryvet v1.5.1 h1:WQ/QccrRrXJ1aX/PMDVQF/MH4jmO4DyUZXraOx7nZ44= +github.com/MirrexOne/unqueryvet v1.5.1/go.mod h1:OBQMEIXwsEASXCWq5hHRGZhxAWhHPJSq/Sgr+gcWg4c= github.com/OpenPeeDeeP/depguard/v2 v2.2.1 h1:vckeWVESWp6Qog7UZSARNqfu/cZqvki8zsuj3piCMx4= github.com/OpenPeeDeeP/depguard/v2 v2.2.1/go.mod h1:q4DKzC4UcVaAvcfd41CZh0PWpGgzrVxUYBlgKNGquUo= github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= -github.com/alecthomas/chroma/v2 v2.21.1 h1:FaSDrp6N+3pphkNKU6HPCiYLgm8dbe5UXIXcoBhZSWA= -github.com/alecthomas/chroma/v2 v2.21.1/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o= +github.com/alecthomas/chroma/v2 v2.23.0 h1:u/Orux1J0eLuZDeQ44froV8smumheieI0EofhbyKhhk= +github.com/alecthomas/chroma/v2 v2.23.0/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o= github.com/alecthomas/go-check-sumtype v0.3.1 h1:u9aUvbGINJxLVXiFvHUlPEaD7VDULsrxJb4Aq31NLkU= github.com/alecthomas/go-check-sumtype v0.3.1/go.mod h1:A8TSiN3UPRw3laIgWEUOHHLPa6/r9MtoigdlP5h3K/E= github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs= @@ -161,8 +161,8 @@ github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQi github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= -github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= -github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= +github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-xmlfmt/xmlfmt v1.1.3 h1:t8Ey3Uy7jDSEisW2K3somuMKIpzktkWptA0iFCnRUWY= github.com/go-xmlfmt/xmlfmt v1.1.3/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= @@ -468,12 +468,12 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o= +golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20251219203646-944ab1f22d93 h1:PbC785RGO6yPO051ItgbG/adwoKRWC0VS7kXXeD/iqk= -golang.org/x/exp/typeparams v0.0.0-20251219203646-944ab1f22d93/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms= +golang.org/x/exp/typeparams v0.0.0-20260112195511-716be5621a96 h1:RMc8anw0hCPcg5CZYN2PEQ8nMwosk461R6vFwPrCFVg= +golang.org/x/exp/typeparams v0.0.0-20260112195511-716be5621a96/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -483,8 +483,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.31.0 h1:HaW9xtz0+kOcWKwli0ZXy79Ix+UW/vOfmWI5QVd2tgI= -golang.org/x/mod v0.31.0/go.mod h1:43JraMp9cGx1Rx3AqioxrbrhNsLl2l/iNAvuBkrezpg= +golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= +golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= 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= @@ -498,8 +498,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= -golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= 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= @@ -546,8 +546,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= -golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= @@ -560,8 +560,8 @@ 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.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= -golang.org/x/tools v0.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA= -golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc= +golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= +golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= 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/github.com/MirrexOne/unqueryvet/.gitignore b/tools/vendor/github.com/MirrexOne/unqueryvet/.gitignore index bd2a78774..02ee35b9b 100644 --- a/tools/vendor/github.com/MirrexOne/unqueryvet/.gitignore +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/.gitignore @@ -41,3 +41,13 @@ Thumbs.db *.log go.work .golangci.local.yml + +# Build tools (downloaded by Taskfile/Gradle) +.tools/ +.task/ + +# VS Code extension build artifacts +extensions/vscode/node_modules/ +extensions/vscode/out/ +extensions/vscode/*.vsix +*.vsix diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/.unqueryvet.example.yaml b/tools/vendor/github.com/MirrexOne/unqueryvet/.unqueryvet.example.yaml new file mode 100644 index 000000000..9d3e7ad3a --- /dev/null +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/.unqueryvet.example.yaml @@ -0,0 +1,164 @@ +# Unqueryvet Configuration File +# This is an example configuration showing all available options +# +# JSON Schema validation is automatically provided by SchemaStore.org +# for editors that support it (VS Code, GoLand, Neovim, etc.) + +# ============================================================================== +# LEVEL 1: Simple Configuration (quick setup) +# ============================================================================== + +# Built-in rules severity configuration +# Available rules: select-star, n1-queries, sql-injection +# Severity values: error, warning, info, ignore +rules: + select-star: warning + n1-queries: warning + sql-injection: error + +# Files to ignore (glob patterns) +ignore: + - "*_test.go" + - "testdata/**" + - "vendor/**" + +# SQL patterns to whitelist (won't trigger warnings) +allow: + - "COUNT(*)" + - "information_schema.*" + +# ============================================================================== +# LEVEL 2: Detailed Configuration (existing options) +# ============================================================================== + +# Enable/disable SQL builder checking (default: true) +check-sql-builders: true + +# Enable/disable aliased wildcard detection like SELECT t.* (default: true) +check-aliased-wildcard: true + +# Enable/disable string concatenation analysis (default: true) +check-string-concat: true + +# Enable/disable format string analysis like fmt.Sprintf (default: true) +check-format-strings: true + +# Enable/disable strings.Builder analysis (default: true) +check-string-builder: true + +# Enable/disable subquery analysis (default: true) +check-subqueries: true + +# Diagnostic severity: "error" or "warning" (default: "warning") +severity: warning + +# SQL builder libraries to check (all enabled by default) +sql-builders: + squirrel: true + gorm: true + sqlx: true + ent: true + pgx: true + bun: true + sqlboiler: true + jet: true + sqlc: true + goqu: true + rel: true + reform: true + +# Legacy: Patterns for files to ignore (use 'ignore' instead) +# ignored-files: +# - "*_test.go" + +# Legacy: Functions to ignore (regex patterns) +# ignored-functions: +# - "debug\\..*" +# - "test.*" + +# Legacy: Regex patterns to allow (use 'allow' instead) +# allowed-patterns: +# - "SELECT \\* FROM temp_.*" + +# ============================================================================== +# LEVEL 3: Custom Rules with DSL (advanced) +# ============================================================================== + +# Define your own analysis rules using patterns and conditions +custom-rules: + # Example 1: Allow SELECT * for temporary tables + - id: allow-temp-tables + pattern: SELECT * FROM $TABLE + when: isTempTable(table) + action: allow + + # Example 2: Detect N+1 queries in loops + - id: n1-in-loop + pattern: $DB.Query($QUERY) + when: in_loop && !contains(function, "batch") + message: "Potential N+1 query detected in loop" + severity: warning + fix: "Consider using batch query or preloading" + + # Example 3: Require WHERE clause for DELETE/UPDATE + - id: require-where + patterns: + - DELETE FROM $TABLE + - UPDATE $TABLE SET $COLS + when: "!has_where" + message: "Dangerous query without WHERE clause" + severity: error + + # Example 4: Context-aware rules (strict in prod code, relaxed in tests) + - id: strict-select-star + pattern: SELECT * FROM $TABLE + when: | + !matches(file, "_test.go$") && + !matches(file, "testdata/") && + !isSystemTable(table) && + !isTempTable(table) + message: "Avoid SELECT * in production code - specify columns explicitly" + severity: error + +# ============================================================================== +# DSL Reference +# ============================================================================== +# +# Pattern Metavariables: +# $TABLE - matches table name (with optional schema) +# $VAR - matches identifier/variable +# $QUERY - matches string literal +# $COLS - matches column list +# $EXPR - matches any expression +# $DB - matches database object +# +# Condition Variables: +# file - current file path +# package - current package name +# function - current function name +# query - SQL query text +# query_type - SELECT, INSERT, UPDATE, DELETE +# table - primary table name +# tables - list of all tables +# columns - list of columns +# has_join - true if query has JOIN +# has_where - true if query has WHERE +# in_loop - true if inside a loop +# loop_depth - nesting depth of loops +# builder - SQL builder type (gorm, squirrel, etc.) +# +# Built-in Functions: +# contains(str, substr) - check if string contains substring +# matches(str, regex) - check if string matches regex +# startsWith(str, prefix) - check if string starts with prefix +# endsWith(str, suffix) - check if string ends with suffix +# isSystemTable(table) - check if table is system/catalog table +# isTempTable(table) - check if table looks like temp table +# isAggregate(query) - check if query has aggregate functions +# +# Operators: +# =~ - regex match (e.g., file =~ "_test.go$") +# !~ - regex not match +# && - logical AND +# || - logical OR +# ! - logical NOT diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/CONTRIBUTING.md b/tools/vendor/github.com/MirrexOne/unqueryvet/CONTRIBUTING.md new file mode 100644 index 000000000..dacc30734 --- /dev/null +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/CONTRIBUTING.md @@ -0,0 +1,341 @@ +# Contributing to unqueryvet + +Thank you for your interest in contributing to unqueryvet! This document provides guidelines and instructions for contributing. + +## Table of Contents + +- [Getting Started](#getting-started) +- [Development Setup](#development-setup) +- [Project Structure](#project-structure) +- [Running Tests](#running-tests) +- [Code Style](#code-style) +- [Pull Request Process](#pull-request-process) +- [Adding New SQL Builders](#adding-new-sql-builders) +- [Reporting Issues](#reporting-issues) + +--- + +## Getting Started + +1. Fork the repository on GitHub +2. Clone your fork locally: + ```bash + git clone https://github.com/YOUR_USERNAME/unqueryvet.git + cd unqueryvet + ``` +3. Add the upstream remote: + ```bash + git remote add upstream https://github.com/MirrexOne/unqueryvet.git + ``` +4. Create a new branch for your feature: + ```bash + git checkout -b feature/your-feature-name + ``` + +--- + +## Development Setup + +### Prerequisites + +- Go 1.24 or later +- [Task](https://taskfile.dev/) (optional, but recommended) +- golangci-lint (for linting) + +### Install Dependencies + +```bash +go mod download +``` + +### Build + +Using Task: +```bash +task build # Build CLI +task build:lsp # Build LSP server +task build:all # Build both +``` + +Using Go directly: +```bash +go build ./cmd/unqueryvet +go build ./cmd/unqueryvet-lsp +``` + +### Install Locally + +```bash +task install:all +# or +go install ./cmd/unqueryvet +go install ./cmd/unqueryvet-lsp +``` + +--- + +## Project Structure + +``` +unqueryvet/ +├── cmd/ +│ ├── unqueryvet/ # CLI entry point +│ └── unqueryvet-lsp/ # LSP server entry point +├── internal/ +│ ├── analyzer/ # Core analysis engine +│ │ ├── sqlbuilders/ # SQL builder support (12 builders) +│ │ ├── n1detector.go # N+1 query detection +│ │ └── sqli_scanner.go # SQL injection scanner +│ ├── cli/ # CLI output utilities +│ ├── configloader/ # Configuration loading +│ ├── dsl/ # Custom Rules DSL engine +│ ├── lsp/ # LSP server implementation +│ ├── messages/ # Error messages +│ ├── runner/ # Analysis runner +│ ├── tui/ # Interactive TUI (Bubble Tea) +│ └── version/ # Version information +├── pkg/ +│ └── config/ # Public configuration API +├── extensions/ +│ ├── goland/ # GoLand/IntelliJ plugin (Kotlin) +│ └── vscode/ # VS Code extension (TypeScript) +├── docs/ # Documentation +├── _examples/ # Example configurations +└── testdata/ # Test fixtures +``` + +### Key Packages + +| Package | Description | +|---------|-------------| +| `internal/analyzer` | Core detection logic (SELECT *, N+1, SQL Injection) | +| `internal/analyzer/sqlbuilders` | Support for 12 SQL builder libraries | +| `internal/dsl` | Custom rules DSL using expr-lang | +| `internal/lsp` | Language Server Protocol implementation | +| `internal/tui` | Interactive terminal UI with Bubble Tea | +| `pkg/config` | Configuration with default rules | + +> **Note**: All three detection rules (SELECT *, N+1, SQL Injection) are enabled by default. + +--- + +## Running Tests + +Using Task: +```bash +task test # Run all tests +task test:race # Run with race detection (requires CGO) +task test:short # Run short tests only +task test:unit # Run unit tests only +task test:integration # Run integration tests +task coverage # Generate coverage report +``` + +Using Go directly: +```bash +go test ./... +go test -v -race ./... +go test -coverprofile=coverage.out ./... +``` + +### Running Benchmarks + +```bash +task bench +# or +go test -bench=. -benchmem ./internal/analyzer +``` + +--- + +## Code Style + +### Formatting + +```bash +task fmt # Format code +task fmt:check # Check formatting +``` + +### Linting + +```bash +task lint # Run golangci-lint +task lint:fix # Run with auto-fix +task vet # Run go vet +``` + +### All Checks + +```bash +task check:all # fmt:check + vet + lint + test +``` + +### Guidelines + +1. **Follow Go conventions** - Use `gofmt`, follow [Effective Go](https://go.dev/doc/effective_go) +2. **Write tests** - All new features should have tests +3. **Document exports** - All exported functions/types need documentation comments +4. **Keep it simple** - Prefer simple, readable code over clever solutions +5. **No breaking changes** - Maintain backward compatibility for public APIs + +--- + +## Pull Request Process + +1. **Sync with upstream** + ```bash + git fetch upstream + git rebase upstream/main + ``` + +2. **Ensure tests pass** + ```bash + task check:all + ``` + +3. **Write meaningful commit messages** + ``` + feat: add support for new SQL builder XYZ + + - Add XYZ builder detection in internal/analyzer/sqlbuilders/ + - Add tests for common XYZ patterns + - Update documentation + ``` + +4. **Push and create PR** + ```bash + git push origin feature/your-feature-name + ``` + +5. **PR Requirements** + - Clear description of changes + - Tests for new functionality + - Documentation updates if needed + - Passing CI checks + +--- + +## Adding New SQL Builders + +To add support for a new SQL builder library: + +### 1. Create Builder File + +Create `internal/analyzer/sqlbuilders/yourbuilder.go`: + +```go +package sqlbuilders + +import ( + "go/ast" +) + +// YourBuilderChecker checks for SELECT * in YourBuilder queries. +type YourBuilderChecker struct { + BaseChecker +} + +// NewYourBuilderChecker creates a new checker for YourBuilder. +func NewYourBuilderChecker() *YourBuilderChecker { + return &YourBuilderChecker{ + BaseChecker: BaseChecker{ + name: "yourbuilder", + packagePath: "github.com/example/yourbuilder", + }, + } +} + +func (c *YourBuilderChecker) Name() string { + return c.name +} + +func (c *YourBuilderChecker) IsApplicable(call *ast.CallExpr) bool { + // Check if this call is from yourbuilder package + return c.isPackageCall(call, "yourbuilder") +} + +func (c *YourBuilderChecker) CheckSelectStar(call *ast.CallExpr) *Violation { + // Implement SELECT * detection logic + return nil +} + +func (c *YourBuilderChecker) CheckChainedCalls(call *ast.CallExpr) []*Violation { + // Check method chains for SELECT * + return nil +} +``` + +### 2. Register in Registry + +Update `internal/analyzer/sqlbuilders/interface.go`: + +```go +func NewRegistry(cfg *config.SQLBuildersConfig) *Registry { + r := &Registry{checkers: make([]SQLBuilderChecker, 0)} + + // ... existing builders ... + + if cfg.YourBuilder { + r.checkers = append(r.checkers, NewYourBuilderChecker()) + } + + return r +} +``` + +### 3. Add Configuration + +Update `pkg/config/config.go`: + +```go +type SQLBuildersConfig struct { + // ... existing fields ... + YourBuilder bool `yaml:"yourbuilder"` +} + +func DefaultSQLBuildersConfig() SQLBuildersConfig { + return SQLBuildersConfig{ + // ... existing defaults ... + YourBuilder: true, + } +} +``` + +### 4. Write Tests + +Create `internal/analyzer/sqlbuilders/yourbuilder_test.go` with test cases. + +### 5. Update Documentation + +- Add to README.md SQL builders table +- Add example in `
` block +- Update `.unqueryvet.example.yaml` + +--- + +## Reporting Issues + +### Bug Reports + +Please include: +- Go version (`go version`) +- unqueryvet version (`unqueryvet -version`) +- Operating system +- Minimal reproducible example +- Expected vs actual behavior + +### Feature Requests + +Please include: +- Use case description +- Proposed solution (if any) +- Examples of desired behavior + +--- + +## Questions? + +- Open a [GitHub Issue](https://github.com/MirrexOne/unqueryvet/issues) + +Thank you for contributing! diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/Dockerfile b/tools/vendor/github.com/MirrexOne/unqueryvet/Dockerfile new file mode 100644 index 000000000..58383d2d1 --- /dev/null +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/Dockerfile @@ -0,0 +1,42 @@ +# Build stage +FROM golang:1.24-alpine AS builder + +RUN apk add --no-cache git gcc musl-dev + +WORKDIR /app + +# Copy go mod files +COPY go.mod go.sum ./ +RUN go mod download + +# Copy source +COPY . . + +# Build binaries +RUN CGO_ENABLED=1 go build -ldflags="-s -w" -o /unqueryvet ./cmd/unqueryvet +RUN CGO_ENABLED=1 go build -ldflags="-s -w" -o /unqueryvet-lsp ./cmd/unqueryvet-lsp + +# Final stage +FROM alpine:3.19 + +RUN apk add --no-cache ca-certificates tzdata + +# Create non-root user +RUN adduser -D -u 1000 unqueryvet +USER unqueryvet + +WORKDIR /workspace + +# Copy binaries +COPY --from=builder /unqueryvet /usr/local/bin/ +COPY --from=builder /unqueryvet-lsp /usr/local/bin/ + +# Default command +ENTRYPOINT ["unqueryvet"] +CMD ["./..."] + +# Labels +LABEL org.opencontainers.image.title="Unqueryvet" +LABEL org.opencontainers.image.description="SQL SELECT * linter for Go" +LABEL org.opencontainers.image.source="https://github.com/MirrexOne/unqueryvet" +LABEL org.opencontainers.image.licenses="MIT" diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/Makefile b/tools/vendor/github.com/MirrexOne/unqueryvet/Makefile deleted file mode 100644 index d92d30681..000000000 --- a/tools/vendor/github.com/MirrexOne/unqueryvet/Makefile +++ /dev/null @@ -1,93 +0,0 @@ -.PHONY: all test build fmt fmt-check lint clean install help - -# Default target -all: fmt test build - -# Run tests -test: - @echo "Running tests..." - @go test -v -race -coverprofile=coverage.out ./... - -# Build the binary -build: - @echo "Building unqueryvet..." - @go build -v ./cmd/unqueryvet - -# Format code with gofmt -s -fmt: - @echo "Formatting code..." - @find . -name "*.go" -not -path "./vendor/*" -exec gofmt -s -w {} + - @go fmt ./... - -# Check if code is formatted -fmt-check: - @echo "Checking code formatting..." - @if [ -n "$$(find . -name '*.go' -not -path './vendor/*' -exec gofmt -s -l {} +)" ]; then \ - echo "The following files need formatting:"; \ - find . -name '*.go' -not -path './vendor/*' -exec gofmt -s -l {} +; \ - exit 1; \ - else \ - echo "All files are properly formatted"; \ - fi - -# Run linter -lint: - @echo "Running linter..." - @if command -v golangci-lint > /dev/null 2>&1; then \ - ./lint-local.sh ./...; \ - else \ - echo "golangci-lint not installed. Install it from https://golangci-lint.run/usage/install/"; \ - exit 1; \ - fi - -# Clean build artifacts -clean: - @echo "Cleaning..." - @rm -f unqueryvet - @rm -f coverage.out - @rm -f .golangci.local.yml - @go clean - -# Install the binary -install: - @echo "Installing unqueryvet..." - @go install ./cmd/unqueryvet - -# Run unqueryvet on the project itself -check: - @echo "Running unqueryvet on project..." - @go run ./cmd/unqueryvet ./... - -# Generate coverage report -coverage: test - @echo "Generating coverage report..." - @go tool cover -html=coverage.out -o coverage.html - @echo "Coverage report generated: coverage.html" - -# Run benchmarks -bench: - @echo "Running benchmarks..." - @go test -bench=. -benchmem ./internal/analyzer - -# Update dependencies -deps: - @echo "Updating dependencies..." - @go mod tidy - @go mod verify - -# Help target -help: - @echo "Available targets:" - @echo " make - Format, test, and build" - @echo " make test - Run tests with race detection" - @echo " make build - Build the unqueryvet binary" - @echo " make fmt - Format all Go files with gofmt -s" - @echo " make fmt-check - Check if files are formatted" - @echo " make lint - Run golangci-lint" - @echo " make clean - Remove build artifacts" - @echo " make install - Install unqueryvet binary" - @echo " make check - Run unqueryvet on the project" - @echo " make coverage - Generate coverage report" - @echo " make bench - Run benchmarks" - @echo " make deps - Update and verify dependencies" - @echo " make help - Show this help message" diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/README.md b/tools/vendor/github.com/MirrexOne/unqueryvet/README.md index a5b2a3aed..e3a77587c 100644 --- a/tools/vendor/github.com/MirrexOne/unqueryvet/README.md +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/README.md @@ -1,80 +1,47 @@ # unqueryvet [![Go Report Card](https://goreportcard.com/badge/github.com/MirrexOne/unqueryvet)](https://goreportcard.com/report/github.com/MirrexOne/unqueryvet) -[![GoDoc](https://godoc.org/github.com/MirrexOne/unqueryvet?status.svg)](https://godoc.org/github.com/MirrexOne/unqueryvet) +[![Go Reference](https://pkg.go.dev/badge/github.com/MirrexOne/unqueryvet.svg)](https://pkg.go.dev/github.com/MirrexOne/unqueryvet) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) -unqueryvet is a Go static analysis tool (linter) that detects `SELECT *` usage in SQL queries and SQL builders, encouraging explicit column selection for better performance, maintainability, and API stability. +**unqueryvet** is a comprehensive Go static analysis tool (linter) for SQL queries. It detects `SELECT *` usage, N+1 query problems, SQL injection vulnerabilities, and provides suggestions for query optimization. -## Features +## Key Features -- **Detects `SELECT *` in string literals** - Finds problematic queries in your Go code -- **Constants and variables support** - Detects `SELECT *` in const and var declarations -- **String concatenation analysis** - Detects `SELECT *` in concatenated strings like `"SELECT * " + "FROM users"` -- **Format string analysis** - Detects `SELECT *` in `fmt.Sprintf`, `log.Printf`, and other format functions -- **Aliased wildcard detection** - Catches `SELECT t.*`, `SELECT alias.*` patterns -- **Subquery detection** - Finds `SELECT *` inside subqueries and nested queries -- **SQL Builder support** - Works with 8 popular SQL builders: Squirrel, GORM, SQLx, Ent, PGX, Bun, SQLBoiler, Jet -- **Auto-fix suggestions** - Provides suggested fixes for detected violations -- **File and function filtering** - Ignore specific files or functions using glob patterns -- **Configurable severity** - Set diagnostic severity to "error" or "warning" -- **Highly configurable** - Extensive configuration options for different use cases -- **Supports `//nolint:unqueryvet`** - Standard Go linting suppression -- **golangci-lint integration** - Works seamlessly with golangci-lint -- **Zero false positives** - Smart pattern recognition for acceptable `SELECT *` usage -- **Fast and lightweight** - Built on golang.org/x/tools/go/analysis +| Feature | Description | +| ----------------------------- | ---------------------------------------------------------------------------- | +| **SELECT \* Detection** | Finds `SELECT *` in raw SQL, SQL builders, and templates | +| **N+1 Query Detection** | Identifies queries inside loops | +| **SQL Injection Scanner** | Detects `fmt.Sprintf` and string concatenation vulnerabilities | +| **12 SQL Builder Support** | Squirrel, GORM, SQLx, Ent, PGX, Bun, SQLBoiler, Jet, sqlc, goqu, rel, reform | +| **Custom Rules DSL** | Define your own analysis rules | +| **LSP Server** | Real-time IDE integration | +| **Interactive TUI** | Fix issues interactively | -## Why avoid `SELECT *`? +--- -- **Performance**: Selecting unnecessary columns wastes network bandwidth and memory -- **Maintainability**: Schema changes can break your application unexpectedly -- **Security**: May expose sensitive data that shouldn't be returned -- **API Stability**: Adding new columns can break clients that depend on column order +## Installation -## Informative Error Messages +### Standalone Tool -Unqueryvet provides context-specific messages that explain WHY you should avoid `SELECT *`: - -```go -// Basic queries -query := "SELECT * FROM users" -// avoid SELECT * - explicitly specify needed columns for better performance, maintainability and stability - -// Aliased wildcards -query := "SELECT t.* FROM users t" -// avoid SELECT alias.* - explicitly specify columns like t.id, t.name for better maintainability - -// String concatenation -query := "SELECT * " + "FROM users" -// avoid SELECT * in concatenated string - explicitly specify needed columns - -// Format strings -query := fmt.Sprintf("SELECT * FROM %s", tableName) -// avoid SELECT * in format string - explicitly specify needed columns - -// Subqueries -query := "SELECT id FROM (SELECT * FROM users)" -// avoid SELECT * in subquery - explicitly specify needed columns +```bash +go install github.com/MirrexOne/unqueryvet/cmd/unqueryvet@latest +``` -// SQL Builders -query := squirrel.Select("*").From("users") -// avoid SELECT * in SQL builder - explicitly specify columns to prevent unnecessary data transfer and schema change issues +### LSP Server (for IDE integration) -// Empty Select() -query := squirrel.Select() -// SQL builder Select() without columns defaults to SELECT * - add specific columns with .Columns() method +```bash +go install github.com/MirrexOne/unqueryvet/cmd/unqueryvet-lsp@latest ``` -## Quick Start - -### As a standalone tool +### Docker ```bash -go install github.com/MirrexOne/unqueryvet/cmd/unqueryvet@latest -unqueryvet ./... +docker pull ghcr.io/mirrexone/unqueryvet:latest +docker run --rm -v $(pwd):/app ghcr.io/mirrexone/unqueryvet /app/... ``` -### With golangci-lint (Recommended) +### With golangci-lint Add to your `.golangci.yml`: @@ -88,278 +55,734 @@ linters: settings: unqueryvet: check-sql-builders: true - # By default, no functions are ignored - minimal configuration - # ignored-functions: - # - "fmt.Printf" - # - "log.Printf" - # allowed-patterns: - # - "SELECT \\* FROM information_schema\\..*" - # - "SELECT \\* FROM pg_catalog\\..*" ``` -## Examples +--- -### Problematic code (will trigger warnings) +## Quick Start -```go -// Constants with SELECT * -const QueryUsers = "SELECT * FROM users" +### Basic Usage + +```bash +# Analyze all packages (all rules enabled by default) +unqueryvet ./... + +# Verbose output with explanations +unqueryvet -verbose ./... + +# Quiet mode (errors only) for CI/CD +unqueryvet -quiet ./... -// Variables with SELECT * -var QueryOrders = "SELECT * FROM orders" +# Show statistics +unqueryvet -stats ./... -// String literals with SELECT * +# Interactive fix mode +unqueryvet -fix ./... + +# Show version +unqueryvet -version +``` + +### Default Rules + +All three detection rules are **enabled by default**: + +| Rule | Default Severity | Description | +|------|-----------------|-------------| +| `select-star` | warning | Detects `SELECT *` usage | +| `n1-queries` | warning | Detects N+1 query patterns (queries in loops) | +| `sql-injection` | error | Detects SQL injection vulnerabilities | + +To disable a rule, set its severity to `ignore` in your `.unqueryvet.yaml`: + +```yaml +rules: + n1-queries: ignore # Disable N+1 detection +``` + +### CLI Flags + +| Flag | Description | +|------|-------------| +| `-version` | Print version information | +| `-verbose` | Enable verbose output with detailed explanations | +| `-quiet` | Quiet mode (only errors) | +| `-stats` | Show analysis statistics | +| `-no-color` | Disable colored output | +| `-n1` | Force enable N+1 detection (overrides config) | +| `-sqli` | Force enable SQL injection detection (overrides config) | +| `-fix` | Interactive fix mode - step through issues and apply fixes | + +### With Configuration File + +```bash +# Create config file +cat > .unqueryvet.yaml << 'EOF' +severity: warning +check-sql-builders: true + +# Rules are enabled by default - configure severity if needed +rules: + select-star: warning + n1-queries: warning + sql-injection: error + +ignore: + - "*_test.go" + - "vendor/**" +EOF + +# Run (auto-loads config) +unqueryvet ./... +``` + +--- + +## Detection Examples + +### 1. SELECT \* Detection + +**Bad code:** + +```go +// Direct SELECT * query := "SELECT * FROM users" -rows, err := db.Query("SELECT * FROM orders WHERE status = ?", "active") -// Aliased wildcards +// Aliased wildcard query := "SELECT t.* FROM users t" -query := "SELECT u.*, o.* FROM users u JOIN orders o ON u.id = o.user_id" -// String concatenation -query := "SELECT * " + "FROM users " + "WHERE id = ?" +// In subquery +query := "SELECT id FROM (SELECT * FROM users)" -// Format strings -query := fmt.Sprintf("SELECT * FROM %s WHERE id = %d", table, id) +// String concatenation +query := "SELECT * " + "FROM users" -// Subqueries -query := "SELECT id FROM (SELECT * FROM users)" -query := "SELECT * FROM users WHERE id IN (SELECT * FROM orders)" +// Format string +query := fmt.Sprintf("SELECT * FROM %s", table) -// SQL builders with SELECT * -query := squirrel.Select("*").From("products") -query := builder.Select().Columns("*").From("inventory") +// SQL builders +squirrel.Select("*").From("users") +db.Model(&User{}).Select("*") +goqu.From("users").Select(goqu.Star()) ``` -### Good code (recommended) +**Good code:** ```go -// Constants with explicit columns -const QueryUsers = "SELECT id, name, email FROM users" +// Explicit columns +query := "SELECT id, name, email FROM users" -// Variables with explicit columns -var QueryOrders = "SELECT id, status, total FROM orders" +// SQL builders +squirrel.Select("id", "name", "email").From("users") +db.Model(&User{}).Select("id", "name", "email") +goqu.From("users").Select("id", "name", "email") +``` -// String literals with explicit column selection -query := "SELECT id, name, email FROM users" -rows, err := db.Query("SELECT id, total FROM orders WHERE status = ?", "active") +### 2. N+1 Query Detection + +**Bad code (triggers warning):** -// SQL builders with explicit columns -query := squirrel.Select("id", "name", "price").From("products") -query := builder.Select().Columns("id", "quantity", "location").From("inventory") +```go +users, _ := db.Query("SELECT id, name FROM users") +for users.Next() { + var user User + users.Scan(&user.ID, &user.Name) + + // N+1 problem: query inside loop + orders, _ := db.Query("SELECT * FROM orders WHERE user_id = ?", user.ID) +} +``` + +**Good code:** + +```go +// Use JOIN +query := ` + SELECT u.id, u.name, o.id, o.total + FROM users u + LEFT JOIN orders o ON u.id = o.user_id +` + +// Or use IN clause +userIDs := []int{1, 2, 3, 4, 5} +query := "SELECT * FROM orders WHERE user_id IN (?)" +db.Query(query, userIDs) ``` -### Acceptable SELECT * usage (won't trigger warnings) +### 3. SQL Injection Detection + +**Bad code (triggers warning):** ```go -// System/meta queries -"SELECT * FROM information_schema.tables" -"SELECT * FROM pg_catalog.pg_tables" +// String concatenation with user input +query := "SELECT * FROM users WHERE name = '" + userName + "'" -// Aggregate functions -"SELECT COUNT(*) FROM users" -"SELECT MAX(*) FROM scores" +// fmt.Sprintf with user input +query := fmt.Sprintf("SELECT * FROM users WHERE id = %s", userID) +``` + +**Good code:** + +```go +// Parameterized query +query := "SELECT id, name FROM users WHERE name = ?" +db.Query(query, userName) -// With nolint suppression -query := "SELECT * FROM debug_table" //nolint:unqueryvet +// Named parameters +query := "SELECT id, name FROM users WHERE id = :id" +db.NamedQuery(query, map[string]interface{}{"id": userID}) ``` +--- + ## Configuration -Unqueryvet is highly configurable to fit your project's needs: +### Full Configuration File (.unqueryvet.yaml) ```yaml -version: "2" +# Built-in rules severity (all enabled by default) +# Available values: error, warning, info, ignore +rules: + select-star: warning # SELECT * detection + n1-queries: warning # N+1 query detection + sql-injection: error # SQL injection scanning + +# Diagnostic severity for legacy options: "error" or "warning" +severity: warning + +# Core analysis options +check-sql-builders: true +check-aliased-wildcard: true +check-string-concat: true +check-format-strings: true +check-string-builder: true +check-subqueries: true + +# SQL builder libraries to check +sql-builders: + squirrel: true + gorm: true + sqlx: true + ent: true + pgx: true + bun: true + sqlboiler: true + jet: true + sqlc: true + goqu: true + rel: true + reform: true + +# File patterns to ignore (glob) +ignored-files: + - "*_test.go" + - "testdata/**" + - "vendor/**" + - "mock_*.go" + +# Function patterns to ignore (regex) +ignored-functions: + - "debug\\..*" + - "test.*" + +# Allowed SELECT * patterns (regex) +allowed-patterns: + - "SELECT \\* FROM information_schema\\..*" + - "SELECT \\* FROM pg_catalog\\..*" + - "SELECT \\* FROM temp_.*" +``` -linters: - settings: - unqueryvet: - # Enable/disable SQL builder checking (default: true) - check-sql-builders: true +--- + +## Custom Rules DSL + +Define your own analysis rules using a powerful DSL with three levels of complexity. + +### Level 1: Simple Configuration + +```yaml +# .unqueryvet.yaml +rules: + select-star: error # Built-in rule severity + n1-queries: warning + sql-injection: error + +ignore: + - "*_test.go" + - "testdata/**" + +allow: + - "COUNT(*)" + - "information_schema.*" +``` + +### Level 2: Pattern Matching + +```yaml +custom-rules: + - id: allow-temp-tables + pattern: SELECT * FROM $TABLE + when: isTempTable(table) + action: allow + + - id: dangerous-delete + pattern: DELETE FROM $TABLE + when: "!has_where" + message: "DELETE without WHERE clause" + severity: error +``` + +### Level 3: Advanced Conditions + +```yaml +custom-rules: + - id: n1-detection + pattern: $DB.Query($QUERY) + when: | + in_loop && + !contains(function, "batch") && + !matches(file, "_test.go$") + message: "N+1 query in loop" + severity: warning + fix: "Use batch query or preloading" +``` + +### DSL Reference + +| **Metavariables** | **Description** | +|-------------------|-----------------| +| `$TABLE` | Table name (with optional schema) | +| `$VAR` | Identifier/variable | +| `$QUERY` | String literal | +| `$COLS` | Column list | +| `$DB` | Database object | + +| **Variables** | **Description** | +|---------------|-----------------| +| `file`, `package`, `function` | Code context | +| `query`, `query_type`, `table` | SQL context | +| `has_where`, `has_join` | Query structure | +| `in_loop`, `loop_depth` | Loop context | +| `builder` | SQL builder type | + +| **Functions** | **Description** | +|---------------|-----------------| +| `contains(s, sub)` | String contains | +| `matches(s, regex)` | Regex match | +| `isSystemTable(t)` | System table check | +| `isTempTable(t)` | Temp table check | +| `isAggregate(q)` | Aggregate function check | + +| **Operators** | **Description** | +|---------------|-----------------| +| `=~`, `!~` | Regex match/not match | +| `&&`, `\|\|`, `!` | Logical operators | + +Full documentation: [docs/DSL.md](docs/DSL.md) + +--- + +## LSP Server (IDE Integration) + +The LSP server provides real-time analysis in your IDE. + +### Starting the Server + +```bash +unqueryvet-lsp +``` + +### VS Code Setup - # Enable/disable aliased wildcard detection like SELECT t.* (default: true) - check-aliased-wildcard: true +Install the extension from `extensions/vscode/` or configure manually: - # Enable/disable string concatenation analysis (default: true) - check-string-concat: true +```json +// .vscode/settings.json +{ + "unqueryvet.enable": true, + "unqueryvet.path": "unqueryvet-lsp", + // All rules enabled by default, args optional + "unqueryvet.trace.server": "verbose" +} +``` - # Enable/disable format string analysis like fmt.Sprintf (default: true) - check-format-strings: true +### Features - # Enable/disable strings.Builder analysis (default: true) - check-string-builder: true +- **Real-time diagnostics** - See issues as you type +- **Hover information** - Explanations on hover +- **Quick fixes** - One-click fixes for SELECT \* +- **Code completion** - Column name suggestions +- **Go to definition** - Navigate to table definitions - # Enable/disable subquery analysis (default: true) - check-subqueries: true +### GoLand/IntelliJ Setup - # Diagnostic severity: "error" or "warning" (default: "warning") - severity: warning +1. Build the plugin: `cd extensions/goland && ./gradlew buildPlugin` +2. Install from disk: Settings → Plugins → Install from disk +3. Configure: Settings → Tools → unqueryvet - # SQL builder libraries to check (all enabled by default) - sql-builders: - squirrel: true - gorm: true - sqlx: true - ent: true - pgx: true - bun: true - sqlboiler: true - jet: true +--- - # Patterns for files to ignore (glob patterns) - # ignored-files: - # - "*_test.go" - # - "testdata/**" - # - "mock_*.go" +## Interactive TUI Mode - # Functions to ignore (regex patterns) - # ignored-functions: - # - "debug\\..*" - # - "test.*" +Fix issues interactively with a terminal UI. - # Default allowed patterns (automatically included): - # - COUNT(*), MAX(*), MIN(*) functions - # - information_schema, pg_catalog, sys schema queries - # You can add more patterns if needed: - # allowed-patterns: - # - "SELECT \\* FROM temp_.*" +```bash +unqueryvet -fix ./... ``` +### Controls + +| Category | Key | Action | +|----------|-----|--------| +| **Navigation** | `↑/k` | Previous issue | +| | `↓/j` | Next issue | +| | `g` | Go to first issue | +| | `G` | Go to last issue | +| **Actions** | `Enter/a` | Apply fix | +| | `s` | Skip issue | +| | `u` | Undo last action | +| | `p` | Toggle preview | +| **Batch** | `A` | Apply all remaining | +| | `S` | Skip all remaining | +| | `R` | Reset all actions | +| **Other** | `e` | Export results to JSON | +| | `?` | Toggle help | +| | `q/Esc` | Quit | + +### Example Session + +``` +Found 15 issues. Review each one: + +[1/15] internal/api/users.go:42:15 +───────────────────────────────────── + 41 | func getUsers(db *sql.DB) { + 42 | query := "SELECT * FROM users" + | ^^^^^^^^^^^^^^^^^^^^^ avoid SELECT * + 43 | rows, _ := db.Query(query) + +Suggestions: + 1. SELECT id, username, email, created_at (from struct User) + 2. SELECT id, username, email + 3. Skip this issue + 4. Edit manually + +Your choice [1-4]: _ +``` + +--- + ## Supported SQL Builders -Unqueryvet supports 8 popular SQL builders out of the box: +### Full Support (12 builders) + +| Builder | Package | Patterns Detected | +| ------------- | ----------------------------------- | -------------------------------------------- | +| **Squirrel** | `github.com/Masterminds/squirrel` | `Select("*")`, `Columns("*")` | +| **GORM** | `gorm.io/gorm` | `Select("*")`, `Find(&users)` without Select | +| **SQLx** | `github.com/jmoiron/sqlx` | `Select()`, raw queries | +| **Ent** | `entgo.io/ent` | Query builder patterns | +| **PGX** | `github.com/jackc/pgx` | `Query()`, `QueryRow()` | +| **Bun** | `github.com/uptrace/bun` | `NewSelect()`, raw queries | +| **SQLBoiler** | `github.com/volatiletech/sqlboiler` | Generated query methods | +| **Jet** | `github.com/go-jet/jet` | `SELECT()`, `STAR` | +| **sqlc** | Generated code | SELECT \* in .sql files | +| **goqu** | `github.com/doug-martin/goqu` | `Select(goqu.Star())`, `SelectAll()` | +| **rel** | `github.com/go-rel/rel` | `Find()`, `FindAll()` without Select | +| **reform** | `gopkg.in/reform.v1` | `FindByPrimaryKeyFrom()`, `SelectAllFrom()` | + +### Examples by Builder + +
+Squirrel + +```go +// Bad +sq.Select("*").From("users") +sq.Select().Columns("*").From("users") + +// Good +sq.Select("id", "name", "email").From("users") +``` + +
-| Library | Package | Detection | -|---------|---------|-----------| -| **Squirrel** | `github.com/Masterminds/squirrel` | `Select("*")`, `Columns("*")` | -| **GORM** | `gorm.io/gorm` | `Select("*")`, raw queries | -| **SQLx** | `github.com/jmoiron/sqlx` | `Select()`, raw queries | -| **Ent** | `entgo.io/ent` | Query builder patterns | -| **PGX** | `github.com/jackc/pgx` | `Query()`, `QueryRow()` | -| **Bun** | `github.com/uptrace/bun` | `NewSelect()`, raw queries | -| **SQLBoiler** | `github.com/volatiletech/sqlboiler` | Generated query methods | -| **Jet** | `github.com/go-jet/jet` | `SELECT()`, `STAR` | +
+GORM -Each checker can be individually enabled/disabled via configuration. +```go +// Bad +db.Select("*").Find(&users) +db.Table("users").Find(&users) // implicit SELECT * + +// Good +db.Select("id", "name", "email").Find(&users) +``` -## Auto-Fix Suggestions +
-Unqueryvet provides automatic fix suggestions for detected violations. When used with editors that support LSP or with `golangci-lint --fix`, you can quickly fix issues: +
+goqu ```go -// Before (violation detected) -query := "SELECT * FROM users" +// Bad +goqu.From("users").Select(goqu.Star()) +goqu.From("users").SelectAll() -// After auto-fix (with TODO placeholder) -query := "SELECT id, /* TODO: specify columns */ FROM users" +// Good +goqu.From("users").Select("id", "name", "email") +``` -// SQL builder before -squirrel.Select("*").From("users") +
+ +
+rel + +```go +// Bad +repo.Find(ctx, &user) // loads all columns +repo.FindAll(ctx, &users) + +// Good +repo.Find(ctx, &user, rel.Select("id", "name", "email")) +``` + +
+ +
+reform + +```go +// Bad +db.FindByPrimaryKeyFrom(UserTable, id, &user) +db.FindAllFrom(UserTable, "status", "active") + +// Good +db.SelectOneFrom(UserTable, "id, name, email WHERE id = ?", id) +``` + +
+ +
+SQLx + +```go +// Bad +db.Select(&users, "SELECT * FROM users") +db.Get(&user, "SELECT * FROM users WHERE id = ?", id) + +// Good +db.Select(&users, "SELECT id, name, email FROM users") +db.Get(&user, "SELECT id, name, email FROM users WHERE id = ?", id) +``` + +
+ +
+Ent + +```go +// Bad - implicit SELECT * +users, err := client.User.Query().All(ctx) + +// Good - explicit column selection +users, err := client.User.Query(). + Select(user.FieldID, user.FieldName, user.FieldEmail). + All(ctx) +``` + +
+ +
+PGX + +```go +// Bad +rows, err := conn.Query(ctx, "SELECT * FROM users") + +// Good +rows, err := conn.Query(ctx, "SELECT id, name, email FROM users") +``` + +
+ +
+Bun + +```go +// Bad +db.NewSelect().Model(&users).Scan(ctx) +db.NewSelect().TableExpr("users").Scan(ctx, &users) + +// Good +db.NewSelect().Model(&users).Column("id", "name", "email").Scan(ctx) +``` + +
+ +
+SQLBoiler + +```go +// Bad - loads all columns +users, err := models.Users().All(ctx, db) +user, err := models.FindUser(ctx, db, userID) + +// Good - explicit column selection +users, err := models.Users( + qm.Select("id", "name", "email"), +).All(ctx, db) +``` + +
-// SQL builder after auto-fix -squirrel.Select("id", /* TODO: specify columns */).From("users") +
+Jet + +```go +// Bad +stmt := SELECT(User.AllColumns).FROM(User) + +// Good +stmt := SELECT(User.ID, User.Name, User.Email).FROM(User) ``` -The auto-fix adds `/* TODO: specify columns */` as a reminder to manually specify the columns you actually need. +
+ +
+sqlc + +```sql +-- Bad (in .sql file) +-- name: GetUsers :many +SELECT * FROM users; + +-- Good +-- name: GetUsers :many +SELECT id, name, email FROM users; +``` -## Integration Examples +
+ +--- + +## Docker & CI/CD + +### Dockerfile + +```dockerfile +FROM golang:1.24-alpine AS builder +RUN go install github.com/MirrexOne/unqueryvet/cmd/unqueryvet@latest + +FROM alpine:latest +COPY --from=builder /go/bin/unqueryvet /usr/local/bin/ +ENTRYPOINT ["unqueryvet"] +``` ### GitHub Actions ```yaml -name: Lint +name: SQL Lint + on: [push, pull_request] + jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 - - uses: actions/setup-go@v6 - - name: golangci-lint - uses: golangci/golangci-lint-action@v8 - with: - version: latest - args: --enable unqueryvet -``` + - uses: actions/checkout@v4 -## Command Line Options + - uses: MirrexOne/unqueryvet-action@v1 + with: + version: latest + args: "-n1 -sqli ./..." + fail-on-issues: true +``` -When used as a standalone tool: +### GitLab CI -```bash -# Check all packages -unqueryvet ./... +```yaml +sql-lint: + image: ghcr.io/mirrexone/unqueryvet:latest + script: + - unqueryvet -quiet -n1 -sqli ./... + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" +``` -# Check specific packages -unqueryvet ./cmd/... ./internal/... +--- -# With custom config file -unqueryvet -config=.unqueryvet.yml ./... +## Exit Codes -# Verbose output -unqueryvet -v ./... -``` +| Code | Meaning | +|------|---------| +| 0 | No issues found | +| 1 | Warnings found | +| 2 | Errors found | +| 3 | Analysis failed | -## Performance +--- -Unqueryvet is designed to be fast and lightweight: +## Documentation -- **Parallel processing**: Analyzes multiple files concurrently -- **Incremental analysis**: Only analyzes changed files when possible -- **Minimal memory footprint**: Efficient AST traversal -- **Smart caching**: Reuses analysis results when appropriate +- [CLI Features Guide](docs/CLI_FEATURES.md) +- [Custom Rules DSL](docs/DSL.md) +- [IDE Integration Guide](docs/IDE_INTEGRATION.md) +- [Verified Features](VERIFIED_FEATURES.md) -## Advanced Usage +--- -### Custom Patterns +## Development -You can define custom regex patterns for acceptable `SELECT *` usage: +### Build -```yaml -allowed-patterns: - # Allow SELECT * from temporary tables - - "SELECT \\* FROM temp_\\w+" - # Allow SELECT * in migration scripts - - "SELECT \\* FROM.*-- migration" - # Allow SELECT * for specific schemas - - "SELECT \\* FROM audit\\..+" +```bash +go build ./cmd/unqueryvet +go build ./cmd/unqueryvet-lsp ``` -### Integration with Custom SQL Builders - -For custom SQL builders, Unqueryvet looks for these patterns: +### Test -```go -// Method chaining -builder.Select("*") // Direct SELECT * -builder.Select().Columns("*") // Chained SELECT * - -// Variable tracking -query := builder.Select() // Empty select -// If no .Columns() call follows, triggers warning +```bash +go test ./... ``` -### Running Tests +### Install locally ```bash -go test ./... -go test -race ./... -go test -bench=. ./... +go install ./cmd/unqueryvet +go install ./cmd/unqueryvet-lsp ``` -### Development Setup +--- + +## Contributing ```bash git clone https://github.com/MirrexOne/unqueryvet.git cd unqueryvet -go mod tidy +go mod download go test ./... +go build ./... ``` +See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. + +--- + ## License MIT License - see [LICENSE](LICENSE) file for details. +--- + +## Acknowledgments + +- Built on [golang.org/x/tools/go/analysis](https://pkg.go.dev/golang.org/x/tools/go/analysis) +- TUI powered by [Bubbletea](https://github.com/charmbracelet/bubbletea) + +--- + ## Support - **Bug Reports**: [GitHub Issues](https://github.com/MirrexOne/unqueryvet/issues) diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/RELEASE.md b/tools/vendor/github.com/MirrexOne/unqueryvet/RELEASE.md new file mode 100644 index 000000000..e1a797ede --- /dev/null +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/RELEASE.md @@ -0,0 +1,203 @@ +# Release Process + +This document describes how to create a new release of Unqueryvet and its VS Code extension. + +## Prerequisites + +- Push access to the repository +- Go 1.21+ installed +- Node.js 20+ installed +- Git configured + +## Release Workflow + +### Option 1: Fully Automated (Recommended) + +1. **Create a Git tag:** + ```bash + git tag -a v1.0.0 -m "Release v1.0.0" + git push origin v1.0.0 + ``` + +2. **Create GitHub Release:** + - Go to https://github.com/MirrexOne/unqueryvet/releases/new + - Select the tag you just pushed (v1.0.0) + - Title: `v1.0.0` + - Description: List of changes + - Click "Publish release" + +3. **What happens automatically:** + - ✅ GitHub Actions builds LSP binaries for all platforms + - ✅ Binaries are attached to the release + - ✅ Checksums file is generated + - ✅ VS Code extension is built + - ✅ VS Code extension is published to Marketplace + - ✅ Extension .vsix is attached to the release + +4. **Wait 5-10 minutes** for workflows to complete + +5. **Verify:** + - Check release has all LSP binaries attached + - Check VS Code Marketplace: https://marketplace.visualstudio.com/items?itemName=mirrexdev.unqueryvet + - Test automatic LSP download in a fresh VS Code instance + +### Option 2: Manual Build + +If you need to build locally: + +1. **Build LSP binaries:** + ```bash + # Using Task + task build:lsp:release + + # Or using script directly + ./scripts/build-lsp.sh v1.0.0 # Linux/macOS + # OR + powershell ./scripts/build-lsp.ps1 -Version v1.0.0 # Windows + ``` + +2. **Check dist/ folder:** + ```bash + ls -lh dist/ + ``` + + You should see: + - unqueryvet-lsp-windows-amd64.exe + - unqueryvet-lsp-windows-arm64.exe + - unqueryvet-lsp-linux-amd64 + - unqueryvet-lsp-linux-arm64 + - unqueryvet-lsp-darwin-amd64 + - unqueryvet-lsp-darwin-arm64 + - checksums.txt + +3. **Upload to GitHub Release manually:** + - Create release on GitHub + - Upload all files from dist/ + +4. **Build VS Code extension:** + ```bash + cd extensions/vscode + npm install + npm run compile + npx @vscode/vsce package + ``` + +5. **Publish VS Code extension:** + ```bash + npx @vscode/vsce publish -p YOUR_PAT_TOKEN + ``` + +## Platform Support + +LSP binaries are built for: + +| Platform | Architecture | File | +|----------|-------------|------| +| Windows | amd64 | unqueryvet-lsp-windows-amd64.exe | +| Windows | arm64 | unqueryvet-lsp-windows-arm64.exe | +| Linux | amd64 | unqueryvet-lsp-linux-amd64 | +| Linux | arm64 | unqueryvet-lsp-linux-arm64 | +| macOS | amd64 | unqueryvet-lsp-darwin-amd64 | +| macOS | arm64 (M1+) | unqueryvet-lsp-darwin-arm64 | + +## Version Numbering + +Follow Semantic Versioning (semver): + +- **Major** (v2.0.0): Breaking changes +- **Minor** (v1.1.0): New features, backward compatible +- **Patch** (v1.0.1): Bug fixes, backward compatible + +## Checklist Before Release + +- [ ] All tests passing (`task test`) +- [ ] Code formatted (`task fmt`) +- [ ] Linter passing (`task lint`) +- [ ] CHANGELOG.md updated +- [ ] Version bumped in: + - [ ] extensions/vscode/package.json + - [ ] extensions/vscode/CHANGELOG.md +- [ ] README.md up to date +- [ ] All PRs merged +- [ ] No breaking changes (or documented) + +## Post-Release + +1. **Test installation:** + ```bash + # Test Go installation + go install github.com/MirrexOne/unqueryvet/cmd/unqueryvet@latest + + # Test LSP installation + go install github.com/MirrexOne/unqueryvet/cmd/unqueryvet-lsp@latest + ``` + +2. **Test VS Code extension:** + - Install from Marketplace + - Open a Go file + - Verify automatic LSP download works + - Verify diagnostics appear + +3. **Update documentation** if needed + +4. **Announce release:** + - Twitter/X + - Reddit r/golang + - LinkedIn + - Discord communities + +## Troubleshooting + +### GitHub Actions fails + +- Check workflow logs: https://github.com/MirrexOne/unqueryvet/actions +- Common issues: + - VSCE_PAT expired → regenerate in Azure DevOps + - Build error → test locally first + - Permission error → check GITHUB_TOKEN permissions + +### VS Code extension not publishing + +- Verify VSCE_PAT secret is set in GitHub +- Check publisher ID matches in package.json (mirrexdev) +- Ensure version number is incremented + +### LSP binaries missing + +- Check GitHub Actions workflow completed +- Verify tag was pushed correctly +- Check release was published (not draft) + +## Emergency Rollback + +If a release has critical bugs: + +1. **Mark as pre-release** on GitHub +2. **Unpublish VS Code extension:** + ```bash + npx @vscode/vsce unpublish mirrexdev.unqueryvet@VERSION + ``` +3. **Fix issues** and create new patch release +4. **Communicate** to users about the issue + +## Files Modified Per Release + +- `extensions/vscode/package.json` - bump version +- `extensions/vscode/CHANGELOG.md` - add release notes +- `CHANGELOG.md` - add release notes (if exists) +- Git tag - create new tag + +## Automation Scripts + +| Script | Purpose | +|--------|---------| +| `scripts/build-lsp.sh` | Build LSP for all platforms (Unix) | +| `scripts/build-lsp.ps1` | Build LSP for all platforms (Windows) | +| `.github/workflows/release-lsp.yml` | Auto-build LSP on release | +| `.github/workflows/publish-vscode-extension.yml` | Auto-publish VS Code extension | + +## Support + +For issues with releases: +- GitHub Issues: https://github.com/MirrexOne/unqueryvet/issues +- GitHub Discussions: https://github.com/MirrexOne/unqueryvet/discussions diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/Taskfile.yml b/tools/vendor/github.com/MirrexOne/unqueryvet/Taskfile.yml new file mode 100644 index 000000000..b93402fe4 --- /dev/null +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/Taskfile.yml @@ -0,0 +1,398 @@ +# https://taskfile.dev +version: "3" + +vars: + VERSION: + sh: git describe --tags --always --dirty 2>/dev/null || echo "dev" + COMMIT: + sh: git rev-parse --short HEAD 2>/dev/null || echo "unknown" + DATE: + sh: date -u +"%Y-%m-%dT%H:%M:%SZ" + BUILT_BY: + sh: echo "$(whoami)@$(hostname)" + LDFLAGS: >- + -X 'github.com/MirrexOne/unqueryvet/internal/version.Version={{.VERSION}}' + -X 'github.com/MirrexOne/unqueryvet/internal/version.Commit={{.COMMIT}}' + -X 'github.com/MirrexOne/unqueryvet/internal/version.Date={{.DATE}}' + -X 'github.com/MirrexOne/unqueryvet/internal/version.BuiltBy={{.BUILT_BY}}' + BINARY_NAME: unqueryvet + BINARY_EXT: + sh: if [ "$(go env GOOS)" = "windows" ]; then echo ".exe"; fi + +tasks: + default: + desc: Format, test, and build + cmds: + - task: fmt + - task: test + - task: build + + # ============================================================================ + # BUILD TASKS + # ============================================================================ + + build: + desc: Build the unqueryvet binary + cmds: + - echo "Building {{.BINARY_NAME}}..." + - go build -v -ldflags "{{.LDFLAGS}}" -o {{.BINARY_NAME}}{{.BINARY_EXT}} ./cmd/unqueryvet + sources: + - "**/*.go" + - go.mod + - go.sum + generates: + - "{{.BINARY_NAME}}{{.BINARY_EXT}}" + + build:lsp: + desc: Build the LSP server binary + cmds: + - echo "Building unqueryvet-lsp..." + - go build -v -ldflags "{{.LDFLAGS}}" -o unqueryvet-lsp{{.BINARY_EXT}} ./cmd/unqueryvet-lsp + sources: + - "**/*.go" + - go.mod + generates: + - "unqueryvet-lsp{{.BINARY_EXT}}" + + build:all: + desc: Build all binaries + cmds: + - task: build + - task: build:lsp + + build:lsp:all: + desc: Build LSP server for all platforms (cross-compile) + cmds: + - echo "Building LSP for all platforms..." + - | + if [ "$(go env GOOS)" = "windows" ]; then + powershell -ExecutionPolicy Bypass -File ./scripts/build-lsp.ps1 -Version "{{.VERSION}}" + else + chmod +x ./scripts/build-lsp.sh + ./scripts/build-lsp.sh "{{.VERSION}}" + fi + - echo "Binaries available in dist/" + + build:lsp:release: + desc: Build LSP for all platforms with release optimizations + cmds: + - echo "Building LSP release binaries..." + - | + if [ "$(go env GOOS)" = "windows" ]; then + powershell -ExecutionPolicy Bypass -File ./scripts/build-lsp.ps1 -Version "{{.VERSION}}" + else + chmod +x ./scripts/build-lsp.sh + ./scripts/build-lsp.sh "{{.VERSION}}" + fi + - cd dist && sha256sum * > checksums.txt + - echo "Release binaries with checksums in dist/" + + install: + desc: Install unqueryvet binary to GOPATH/bin + cmds: + - echo "Installing unqueryvet..." + - go install -ldflags "{{.LDFLAGS}}" ./cmd/unqueryvet + + install:all: + desc: Install all binaries to GOPATH/bin + cmds: + - echo "Installing all binaries..." + - go install -ldflags "{{.LDFLAGS}}" ./cmd/unqueryvet + - go install -ldflags "{{.LDFLAGS}}" ./cmd/unqueryvet-lsp + + # ============================================================================ + # TEST TASKS + # ============================================================================ + + test: + desc: Run tests with race detection (requires CGO on Windows) + cmds: + - echo "Running tests..." + - go test -v -coverprofile=coverage.out ./... + + test:race: + desc: Run tests with race detection (requires CGO_ENABLED=1) + cmds: + - echo "Running tests with race detection..." + - go test -v -race -coverprofile=coverage.out ./... + + test:short: + desc: Run short tests (skip long-running tests) + cmds: + - echo "Running short tests..." + - go test -v -short ./... + + test:unit: + desc: Run unit tests only + cmds: + - echo "Running unit tests..." + - go test -v ./internal/... + + test:integration: + desc: Run integration tests + cmds: + - echo "Running integration tests..." + - go test -v -tags=integration ./... + + bench: + desc: Run benchmarks + cmds: + - echo "Running benchmarks..." + - go test -bench=. -benchmem ./internal/analyzer + + bench:all: + desc: Run all benchmarks with comparison + cmds: + - echo "Running all benchmarks..." + - go test -bench=. -benchmem -count=5 ./... | tee bench.txt + + coverage: + desc: Generate coverage report + deps: [test] + cmds: + - echo "Generating coverage report..." + - go tool cover -html=coverage.out -o coverage.html + - echo "Coverage report generated - coverage.html" + + coverage:func: + desc: Show function coverage + deps: [test] + cmds: + - go tool cover -func=coverage.out + + # ============================================================================ + # FORMAT & LINT TASKS + # ============================================================================ + + fmt: + desc: Format all Go files + cmds: + - echo "Formatting code..." + - gofmt -s -w . + - go fmt ./... + + fmt:check: + desc: Check if code is formatted + cmds: + - echo "Checking code formatting..." + - | + UNFORMATTED=$(gofmt -s -l .) + if [ -n "$UNFORMATTED" ]; then + echo "The following files need formatting:" + echo "$UNFORMATTED" + exit 1 + else + echo "All files are properly formatted" + fi + + lint: + desc: Run golangci-lint + cmds: + - echo "Running linter..." + - golangci-lint run ./... + + lint:fix: + desc: Run golangci-lint with auto-fix + cmds: + - echo "Running linter with auto-fix..." + - golangci-lint run --fix ./... + + vet: + desc: Run go vet + cmds: + - echo "Running go vet..." + - go vet ./... + + check: + desc: Run unqueryvet on the project itself + cmds: + - echo "Running unqueryvet on project..." + - go run ./cmd/unqueryvet ./... + + check:all: + desc: Run all checks (fmt, vet, lint, test) + cmds: + - task: fmt:check + - task: vet + - task: lint + - task: test + + # ============================================================================ + # DEPENDENCY TASKS + # ============================================================================ + + deps: + desc: Update and verify dependencies + cmds: + - echo "Updating dependencies..." + - go mod tidy + - go mod verify + + deps:download: + desc: Download all dependencies + cmds: + - echo "Downloading dependencies..." + - go mod download + + deps:upgrade: + desc: Upgrade all dependencies to latest + cmds: + - echo "Upgrading dependencies..." + - go get -u ./... + - go mod tidy + + deps:graph: + desc: Show dependency graph + cmds: + - go mod graph + + # ============================================================================ + # DOCKER TASKS + # ============================================================================ + + docker:build: + desc: Build Docker image + cmds: + - echo "Building Docker image..." + - docker build -t unqueryvet:{{.VERSION}} -t unqueryvet:latest . + + docker:run: + desc: Run unqueryvet in Docker + cmds: + - docker run --rm -v $(pwd):/app unqueryvet:latest /app/... + + docker:push: + desc: Push Docker image to registry + vars: + REGISTRY: '{{.REGISTRY | default "ghcr.io/mirrexone"}}' + cmds: + - docker tag unqueryvet:{{.VERSION}} {{.REGISTRY}}/unqueryvet:{{.VERSION}} + - docker tag unqueryvet:latest {{.REGISTRY}}/unqueryvet:latest + - docker push {{.REGISTRY}}/unqueryvet:{{.VERSION}} + - docker push {{.REGISTRY}}/unqueryvet:latest + + # ============================================================================ + # RELEASE TASKS + # ============================================================================ + + release:snapshot: + desc: Create a snapshot release (no publish) + cmds: + - echo "Creating snapshot release..." + - goreleaser release --snapshot --clean + + release: + desc: Create and publish a release + cmds: + - echo "Creating release..." + - goreleaser release --clean + preconditions: + - sh: test -n "$GITHUB_TOKEN" + msg: "GITHUB_TOKEN is required" + + # ============================================================================ + # DEVELOPMENT TASKS + # ============================================================================ + + dev: + desc: Run in development mode with watch + cmds: + - echo "Starting development mode..." + - go run ./cmd/unqueryvet -watch ./... + + dev:lsp: + desc: Run LSP server in development mode + cmds: + - echo "Starting LSP server..." + - go run ./cmd/unqueryvet-lsp + + generate: + desc: Run go generate + cmds: + - echo "Running go generate..." + - go generate ./... + + # ============================================================================ + # CLEAN TASKS + # ============================================================================ + + clean: + desc: Remove build artifacts + cmds: + - echo "Cleaning..." + - rm -f {{.BINARY_NAME}}{{.BINARY_EXT}} + - rm -f unqueryvet-lsp{{.BINARY_EXT}} + - rm -f coverage.out coverage.html + - rm -f bench.txt + - rm -rf dist/ + - go clean + + clean:cache: + desc: Clean Go build cache + cmds: + - echo "Cleaning Go cache..." + - go clean -cache + + clean:testcache: + desc: Clean Go test cache + cmds: + - echo "Cleaning test cache..." + - go clean -testcache + + clean:all: + desc: Clean everything + cmds: + - task: clean + - task: clean:cache + - task: clean:testcache + + # ============================================================================ + # EXTENSION TASKS + # ============================================================================ + + ext:vscode:build: + desc: Build VS Code extension + dir: extensions/vscode + cmds: + - echo "Building VS Code extension..." + - npm install + - npm run compile + + ext:vscode:package: + desc: Package VS Code extension + dir: extensions/vscode + cmds: + - echo "Packaging VS Code extension..." + - npm run package + + ext:goland:build: + desc: Build GoLand plugin + dir: extensions/goland + cmds: + - echo "Building GoLand plugin..." + - ./gradlew buildPlugin + + # ============================================================================ + # DOCUMENTATION TASKS + # ============================================================================ + + docs:serve: + desc: Serve documentation locally + cmds: + - echo "Serving docs on http://localhost:8000" + - python -m http.server 8000 --directory docs + + docs:godoc: + desc: Run godoc server + cmds: + - echo "Starting godoc on http://localhost:6060" + - godoc -http=:6060 + + # ============================================================================ + # HELP + # ============================================================================ + + help: + desc: Show all available tasks + cmds: + - task --list-all diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/action.yml b/tools/vendor/github.com/MirrexOne/unqueryvet/action.yml new file mode 100644 index 000000000..d01b9ae95 --- /dev/null +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/action.yml @@ -0,0 +1,92 @@ +name: "Unqueryvet" +description: "Detect inconsistencies in Go SQL queries" +author: "MirrexOne" + +branding: + icon: "search" + color: "blue" + +inputs: + version: + description: "Version of unqueryvet to use" + required: false + default: "latest" + working-directory: + description: "Working directory" + required: false + default: "." + args: + description: "Arguments to pass to unqueryvet" + required: false + default: "./..." + fail-on-issues: + description: "Fail the action if issues are found" + required: false + default: "true" + check-n1: + description: "Enable N+1 query detection" + required: false + default: "false" + check-sqli: + description: "Enable SQL injection detection" + required: false + default: "false" + +outputs: + issues-found: + description: "Number of issues found" + value: ${{ steps.run.outputs.issues }} + exit-code: + description: "Exit code from unqueryvet" + value: ${{ steps.run.outputs.exit_code }} + +runs: + using: "composite" + steps: + - name: Install unqueryvet + shell: bash + run: | + if [ "${{ inputs.version }}" = "latest" ]; then + go install github.com/MirrexOne/unqueryvet/cmd/unqueryvet@latest + else + go install github.com/MirrexOne/unqueryvet/cmd/unqueryvet@${{ inputs.version }} + fi + + - name: Run unqueryvet + id: run + shell: bash + working-directory: ${{ inputs.working-directory }} + run: | + set +e + + ARGS="${{ inputs.args }}" + + if [ "${{ inputs.check-n1 }}" = "true" ]; then + ARGS="-n1 $ARGS" + fi + + if [ "${{ inputs.check-sqli }}" = "true" ]; then + ARGS="-sqli $ARGS" + fi + + OUTPUT=$(unqueryvet $ARGS 2>&1) + EXIT_CODE=$? + + echo "$OUTPUT" + + # Count issues (lines with file:line:column pattern) + ISSUES=$(echo "$OUTPUT" | grep -c ":[0-9]*:[0-9]*:" || true) + + echo "issues=$ISSUES" >> $GITHUB_OUTPUT + echo "exit_code=$EXIT_CODE" >> $GITHUB_OUTPUT + + if [ "${{ inputs.fail-on-issues }}" = "true" ] && [ $EXIT_CODE -ne 0 ]; then + echo "::error::Unqueryvet found $ISSUES issues" + exit 1 + fi + + if [ $ISSUES -eq 0 ]; then + echo "::notice::No SELECT * issues found!" + else + echo "::warning::Found $ISSUES SELECT * issues" + fi diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/analyzer.go b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/analyzer.go index 023aa358c..f93ac1685 100644 --- a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/analyzer.go +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/analyzer.go @@ -38,12 +38,7 @@ var ( // NewAnalyzer creates the Unqueryvet analyzer with enhanced logic for production use func NewAnalyzer() *analysis.Analyzer { - return &analysis.Analyzer{ - Name: "unqueryvet", - Doc: "detects SELECT * in SQL queries and SQL builders, preventing performance issues and encouraging explicit column selection", - Run: run, - Requires: []*analysis.Analyzer{inspect.Analyzer}, - } + return NewAnalyzerWithSettings(config.DefaultSettings()) } // NewAnalyzerWithSettings creates analyzer with provided settings for golangci-lint integration @@ -58,6 +53,14 @@ func NewAnalyzerWithSettings(s config.UnqueryvetSettings) *analysis.Analyzer { } } +// analysisContext holds the context for AST analysis +type analysisContext struct { + pass *analysis.Pass + cfg *config.UnqueryvetSettings + filter *FilterContext + builderRegistry *sqlbuilders.Registry +} + // RunWithConfig performs analysis with provided configuration // This is the main entry point for configured analysis func RunWithConfig(pass *analysis.Pass, cfg *config.UnqueryvetSettings) (any, error) { @@ -90,6 +93,13 @@ func RunWithConfig(pass *analysis.Pass, cfg *config.UnqueryvetSettings) (any, er builderRegistry = sqlbuilders.NewRegistry(&cfg.SQLBuilders) } + ctx := &analysisContext{ + pass: pass, + cfg: cfg, + filter: filter, + builderRegistry: builderRegistry, + } + // Define AST node types we're interested in nodeFilter := []ast.Node{ (*ast.CallExpr)(nil), // Function/method calls @@ -100,103 +110,83 @@ func RunWithConfig(pass *analysis.Pass, cfg *config.UnqueryvetSettings) (any, er } // Walk through all AST nodes and analyze them - insp.Preorder(nodeFilter, func(n ast.Node) { - switch node := n.(type) { - case *ast.File: - // Analyze SQL builders only if enabled in configuration - if cfg.CheckSQLBuilders { - analyzeSQLBuilders(pass, node) - } - case *ast.AssignStmt: - // Check assignment statements for standalone SQL literals - checkAssignStmt(pass, node, cfg) - case *ast.GenDecl: - // Check constant and variable declarations - checkGenDecl(pass, node, cfg) - case *ast.CallExpr: - // Check if function should be ignored - if filter != nil && filter.IsIgnoredFunction(node) { - return - } - - // Check format functions (fmt.Sprintf, etc.) - if cfg.CheckFormatStrings && CheckFormatFunction(pass, node, cfg) { - pass.Report(analysis.Diagnostic{ - Pos: node.Pos(), - Message: getDetailedWarningMessage("format_string"), - }) - return - } - - // Check SQL builder patterns - if builderRegistry != nil && builderRegistry.HasCheckers() { - violations := builderRegistry.Check(node) - for _, v := range violations { - pass.Report(analysis.Diagnostic{ - Pos: v.Pos, - End: v.End, - Message: v.Message, - }) - } - if len(violations) > 0 { - return - } - } - - // Analyze function calls for SQL with SELECT * usage - checkCallExpr(pass, node, cfg) - - case *ast.BinaryExpr: - // Check string concatenation for SELECT * - if cfg.CheckStringConcat && CheckConcatenation(pass, node, cfg) { - pass.Report(analysis.Diagnostic{ - Pos: node.Pos(), - Message: getDetailedWarningMessage("concat"), - }) - } - } - }) + insp.Preorder(nodeFilter, ctx.handleNode) return nil, nil } -// run performs the main analysis of Go code files for SELECT * usage -func run(pass *analysis.Pass) (any, error) { - insp := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) +// handleNode dispatches AST node to appropriate handler +func (ctx *analysisContext) handleNode(n ast.Node) { + switch node := n.(type) { + case *ast.File: + ctx.handleFileNode(node) + case *ast.AssignStmt: + // Check assignment statements for standalone SQL literals + checkAssignStmt(ctx.pass, node, ctx.cfg) + case *ast.GenDecl: + // Check constant and variable declarations + checkGenDecl(ctx.pass, node, ctx.cfg) + case *ast.CallExpr: + ctx.handleCallExpr(node) + // Analyze function calls for SQL with SELECT * usage + case *ast.BinaryExpr: + ctx.handleBinaryExpr(node) + } +} - // Define AST node types we're interested in - nodeFilter := []ast.Node{ - (*ast.CallExpr)(nil), // Function/method calls - (*ast.File)(nil), // Files (for SQL builder analysis) - (*ast.AssignStmt)(nil), // Assignment statements for standalone literals - (*ast.GenDecl)(nil), // General declarations (const, var) +// handleFileNode processes file-level analysis +func (ctx *analysisContext) handleFileNode(node *ast.File) { + if ctx.cfg.CheckSQLBuilders { + // Analyze SQL builders only if enabled in configuration + analyzeSQLBuilders(ctx.pass, node) + } + if ctx.cfg.N1DetectionEnabled { + AnalyzeN1(ctx.pass, node) + } + if ctx.cfg.SQLInjectionDetectionEnabled { + AnalyzeSQLInjection(ctx.pass, node) } +} - // Always use default settings since passing settings through ResultOf doesn't work reliably - defaultSettings := config.DefaultSettings() - cfg := &defaultSettings +// handleCallExpr processes function/method call expressions +func (ctx *analysisContext) handleCallExpr(node *ast.CallExpr) { + if ctx.filter != nil && ctx.filter.IsIgnoredFunction(node) { + return + } - // Walk through all AST nodes and analyze them - insp.Preorder(nodeFilter, func(n ast.Node) { - switch node := n.(type) { - case *ast.File: - // Analyze SQL builders only if enabled in configuration - if cfg.CheckSQLBuilders { - analyzeSQLBuilders(pass, node) - } - case *ast.AssignStmt: - // Check assignment statements for standalone SQL literals - checkAssignStmt(pass, node, cfg) - case *ast.GenDecl: - // Check constant and variable declarations - checkGenDecl(pass, node, cfg) - case *ast.CallExpr: - // Analyze function calls for SQL with SELECT * usage - checkCallExpr(pass, node, cfg) + if ctx.cfg.CheckFormatStrings && CheckFormatFunction(ctx.pass, node, ctx.cfg) { + ctx.pass.Report(analysis.Diagnostic{ + Pos: node.Pos(), + Message: getDetailedWarningMessage("format_string"), + }) + return + } + + if ctx.builderRegistry != nil && ctx.builderRegistry.HasCheckers() { + violations := ctx.builderRegistry.Check(node) + for _, v := range violations { + ctx.pass.Report(analysis.Diagnostic{ + Pos: v.Pos, + End: v.End, + Message: v.Message, + }) } - }) + if len(violations) > 0 { + return + } + } - return nil, nil + checkCallExpr(ctx.pass, node, ctx.cfg) +} + +// handleBinaryExpr processes binary expressions (string concatenation) +func (ctx *analysisContext) handleBinaryExpr(node *ast.BinaryExpr) { + if ctx.cfg.CheckStringConcat && CheckConcatenation(ctx.pass, node, ctx.cfg) { + ctx.pass.Report(analysis.Diagnostic{ + Pos: node.Pos(), + Message: getDetailedWarningMessage("concat"), + }) + } } // checkAssignStmt checks assignment statements for standalone SQL literals @@ -449,75 +439,86 @@ func isSQLBuilderSelectStar(call *ast.CallExpr) bool { // analyzeSQLBuilders performs advanced SQL builder analysis // Key logic for handling edge-cases like Select().Columns("*") func analyzeSQLBuilders(pass *analysis.Pass, file *ast.File) { - // Track SQL builder variables and their state - builderVars := make(map[string]*ast.CallExpr) // Variables with empty Select() calls - hasColumns := make(map[string]bool) // Flag: were columns added for variable + builderVars, hasColumns := findEmptySelectCalls(file) + checkColumnsUsage(pass, file, builderVars, hasColumns) + reportEmptySelects(pass, builderVars, hasColumns) +} + +// findEmptySelectCalls finds variables created with empty Select() calls +func findEmptySelectCalls(file *ast.File) (map[string]*ast.CallExpr, map[string]bool) { + builderVars := make(map[string]*ast.CallExpr) + hasColumns := make(map[string]bool) - // First pass: find variables created with empty Select() calls ast.Inspect(file, func(n ast.Node) bool { - switch node := n.(type) { - case *ast.AssignStmt: - // Analyze assignments like: query := builder.Select() - for i, expr := range node.Rhs { - if call, ok := expr.(*ast.CallExpr); ok { - if isEmptySelectCall(call) { - // Found empty Select() call, remember the variable - if i < len(node.Lhs) { - if ident, ok := node.Lhs[i].(*ast.Ident); ok { - builderVars[ident.Name] = call - hasColumns[ident.Name] = false - } - } - } + assign, ok := n.(*ast.AssignStmt) + if !ok { + return true + } + for i, expr := range assign.Rhs { + call, ok := expr.(*ast.CallExpr) + if !ok || !isEmptySelectCall(call) { + continue + } + if i < len(assign.Lhs) { + if ident, ok := assign.Lhs[i].(*ast.Ident); ok { + builderVars[ident.Name] = call + hasColumns[ident.Name] = false } } } return true }) - // Second pass: check usage of Columns/Column methods + return builderVars, hasColumns +} + +// checkColumnsUsage checks usage of Columns/Column methods and reports violations +func checkColumnsUsage(pass *analysis.Pass, file *ast.File, builderVars map[string]*ast.CallExpr, hasColumns map[string]bool) { ast.Inspect(file, func(n ast.Node) bool { - switch node := n.(type) { - case *ast.CallExpr: - if sel, ok := node.Fun.(*ast.SelectorExpr); ok { - // Check calls to Columns() or Column() methods - if sel.Sel != nil && (sel.Sel.Name == columnsKeyword || sel.Sel.Name == columnKeyword) { - // Check for "*" in arguments - if hasStarInColumns(node) { - pass.Report(analysis.Diagnostic{ - Pos: node.Pos(), - Message: getDetailedWarningMessage("sql_builder"), - }) - } - - // Update variable state - columns were added - if ident, ok := sel.X.(*ast.Ident); ok { - if _, exists := builderVars[ident.Name]; exists { - if !hasStarInColumns(node) { - hasColumns[ident.Name] = true - } - } - } - } - } + call, ok := n.(*ast.CallExpr) + if !ok { + return true + } - // Check call chains like builder.Select().Columns("*") - if isSelectWithColumns(node) { - if hasStarInColumns(node) { - if sel, ok := node.Fun.(*ast.SelectorExpr); ok && sel.Sel != nil { - pass.Report(analysis.Diagnostic{ - Pos: node.Pos(), - Message: getDetailedWarningMessage("sql_builder"), - }) - } - } - return true + // Check call chains like builder.Select().Columns("*") + if isSelectWithColumns(call) && hasStarInColumns(call) { + pass.Report(analysis.Diagnostic{ + Pos: call.Pos(), + Message: getDetailedWarningMessage("sql_builder"), + }) + return true + } + + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok || sel.Sel == nil { + return true + } + + // Check calls to Columns() or Column() methods + if sel.Sel.Name != columnsKeyword && sel.Sel.Name != columnKeyword { + return true + } + + if hasStarInColumns(call) { + pass.Report(analysis.Diagnostic{ + Pos: call.Pos(), + Message: getDetailedWarningMessage("sql_builder"), + }) + } + + // Update variable state - columns were added + if ident, ok := sel.X.(*ast.Ident); ok { + if _, exists := builderVars[ident.Name]; exists && !hasStarInColumns(call) { + hasColumns[ident.Name] = true } } + return true }) +} - // Final check: warn about builders with empty Select() without subsequent columns +// reportEmptySelects reports builders with empty Select() without subsequent columns +func reportEmptySelects(pass *analysis.Pass, builderVars map[string]*ast.CallExpr, hasColumns map[string]bool) { for varName, call := range builderVars { if !hasColumns[varName] { pass.Report(analysis.Diagnostic{ @@ -563,3 +564,21 @@ func hasStarInColumns(call *ast.CallExpr) bool { } return false } + +// IsRuleEnabledExported checks if a rule is enabled in the configuration. +// A rule is enabled if it exists in the Rules map and its severity is not "ignore". +func IsRuleEnabledExported(rules config.RuleSeverity, ruleID string) bool { + if rules == nil { + return false + } + severity, exists := rules[ruleID] + if !exists { + return false + } + return severity != "ignore" +} + +// isRuleEnabled is an internal helper for checking rule enablement. +func isRuleEnabled(rules config.RuleSeverity, ruleID string) bool { + return IsRuleEnabledExported(rules, ruleID) +} diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/format.go b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/format.go index 5fc827ed8..c96636706 100644 --- a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/format.go +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/format.go @@ -15,39 +15,39 @@ import ( // Index -1 means the format string is the last argument (for variadic functions). var formatFunctions = map[string]int{ // fmt package - "fmt.Sprintf": 0, - "fmt.Printf": 0, - "fmt.Fprintf": 1, // first arg is io.Writer - "fmt.Errorf": 0, - "fmt.Fscanf": 1, - "fmt.Sscanf": 1, - "Sprintf": 0, // direct call after import - "Printf": 0, - "Errorf": 0, + "fmt.Sprintf": 0, + "fmt.Printf": 0, + "fmt.Fprintf": 1, // first arg is io.Writer + "fmt.Errorf": 0, + "fmt.Fscanf": 1, + "fmt.Sscanf": 1, + "Sprintf": 0, // direct call after import + "Printf": 0, + "Errorf": 0, // log package - "log.Printf": 0, - "log.Fatalf": 0, - "log.Panicf": 0, - "log.Logf": 1, // first arg is log level + "log.Printf": 0, + "log.Fatalf": 0, + "log.Panicf": 0, + "log.Logf": 1, // first arg is log level "Logger.Printf": 0, - "Logger.Fatalf": 0, - "Logger.Panicf": 0, + "Logger.Fatalf": 0, + "Logger.Panicf": 0, // testing package - "testing.T.Logf": 0, - "testing.T.Errorf": 0, - "testing.T.Fatalf": 0, - "testing.T.Skipf": 0, - "testing.B.Logf": 0, - "testing.B.Errorf": 0, - "testing.B.Fatalf": 0, - "T.Logf": 0, - "T.Errorf": 0, - "T.Fatalf": 0, - "B.Logf": 0, - "B.Errorf": 0, - "B.Fatalf": 0, + "testing.T.Logf": 0, + "testing.T.Errorf": 0, + "testing.T.Fatalf": 0, + "testing.T.Skipf": 0, + "testing.B.Logf": 0, + "testing.B.Errorf": 0, + "testing.B.Fatalf": 0, + "T.Logf": 0, + "T.Errorf": 0, + "T.Fatalf": 0, + "B.Logf": 0, + "B.Errorf": 0, + "B.Fatalf": 0, // errors package "errors.Errorf": 0, @@ -57,26 +57,26 @@ var formatFunctions = map[string]int{ "errors.WithMessagef": 1, // logrus - "logrus.Infof": 0, - "logrus.Warnf": 0, - "logrus.Errorf": 0, - "logrus.Debugf": 0, - "logrus.Fatalf": 0, - "logrus.Panicf": 0, - "logrus.Tracef": 0, - "logrus.Printf": 0, - "Entry.Infof": 0, - "Entry.Warnf": 0, - "Entry.Errorf": 0, - "Entry.Debugf": 0, + "logrus.Infof": 0, + "logrus.Warnf": 0, + "logrus.Errorf": 0, + "logrus.Debugf": 0, + "logrus.Fatalf": 0, + "logrus.Panicf": 0, + "logrus.Tracef": 0, + "logrus.Printf": 0, + "Entry.Infof": 0, + "Entry.Warnf": 0, + "Entry.Errorf": 0, + "Entry.Debugf": 0, // zap - "zap.S.Infof": 0, - "zap.S.Warnf": 0, - "zap.S.Errorf": 0, - "zap.S.Debugf": 0, - "zap.S.Fatalf": 0, - "zap.S.Panicf": 0, + "zap.S.Infof": 0, + "zap.S.Warnf": 0, + "zap.S.Errorf": 0, + "zap.S.Debugf": 0, + "zap.S.Fatalf": 0, + "zap.S.Panicf": 0, "SugaredLogger.Infof": 0, "SugaredLogger.Warnf": 0, "SugaredLogger.Errorf": 0, diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/n1detector.go b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/n1detector.go new file mode 100644 index 000000000..cf0331129 --- /dev/null +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/n1detector.go @@ -0,0 +1,546 @@ +package analyzer + +import ( + "go/ast" + "go/token" + "strings" + + "golang.org/x/tools/go/analysis" +) + +// N1Detector detects potential N+1 query problems. +// An N+1 query problem occurs when a SQL query is executed inside a loop, +// causing one query per iteration instead of a single batch query. +type N1Detector struct { + // loopDepth tracks how deeply nested we are in loops + loopDepth int + // queryMethods are method names that typically execute SQL queries + queryMethods map[string]bool + // ormMethods are ORM-specific methods that indicate queries + ormMethods map[string]bool + // transactionMethods are methods that indicate transaction usage + transactionMethods map[string]bool + // functionCallsInLoop tracks function calls made inside loops for indirect N+1 detection + functionCallsInLoop map[string]bool + // knownQueryFunctions are user-defined functions known to execute queries + knownQueryFunctions map[string]bool +} + +// NewN1Detector creates a new N+1 query detector. +func NewN1Detector() *N1Detector { + return &N1Detector{ + queryMethods: map[string]bool{ + // Standard database/sql + "Query": true, + "QueryRow": true, + "Exec": true, + "ExecContext": true, + "QueryContext": true, + "QueryRowContext": true, + // SQLx + "QueryRowx": true, + "Queryx": true, + "SelectContext": true, + "GetContext": true, + "NamedQuery": true, + "NamedQueryContext": true, + "NamedExec": true, + "NamedExecContext": true, + // General + "Select": true, + "Get": true, + "Find": true, + "First": true, + "Where": true, + "Raw": true, + }, + ormMethods: map[string]bool{ + // GORM + "Preload": true, + "Association": true, + "Related": true, + "Model": true, + "Table": true, + "Joins": true, + "InnerJoins": true, + "Pluck": true, + "Count": true, + "Take": true, + "Last": true, + "Scan": true, + "Row": true, + "Rows": true, + // Bun + "NewSelect": true, + "NewInsert": true, + "NewUpdate": true, + "NewDelete": true, + "Column": true, + "ColumnExpr": true, + "Relation": true, + // Ent + "Only": true, + "OnlyX": true, + "AllX": true, + "FirstX": true, + // SQLBoiler + "One": true, + "OneP": true, + "AllP": true, + "Exists": true, + "ExistsP": true, + // PGX + "SendBatch": true, + }, + transactionMethods: map[string]bool{ + "Begin": true, + "BeginTx": true, + "BeginTxx": true, + "Transaction": true, + "WithContext": true, + "RunInTransaction": true, + "Tx": true, + "NewTx": true, + }, + functionCallsInLoop: make(map[string]bool), + knownQueryFunctions: make(map[string]bool), + } +} + +// N1Severity represents the severity level of an N+1 violation. +type N1Severity string + +const ( + N1SeverityCritical N1Severity = "critical" // Direct query in loop + N1SeverityHigh N1Severity = "high" // ORM method in loop + N1SeverityMedium N1Severity = "medium" // Indirect query via function call + N1SeverityLow N1Severity = "low" // Potential issue, needs review +) + +// N1Violation represents a detected N+1 query problem. +type N1Violation struct { + Pos token.Pos + End token.Pos + Message string + LoopType string // "for", "range", or "while-like" + QueryType string // The method name that was called + Severity N1Severity // Severity level + Suggestion string // Suggested fix + IsIndirect bool // True if detected via function call + FunctionName string // Name of the function if indirect +} + +// CheckN1Queries analyzes the file for N+1 query patterns. +func (d *N1Detector) CheckN1Queries(pass *analysis.Pass, file *ast.File) []N1Violation { + var violations []N1Violation + + ast.Inspect(file, func(n ast.Node) bool { + switch node := n.(type) { + case *ast.ForStmt: + // Entering a for loop + d.loopDepth++ + defer func() { d.loopDepth-- }() + + // Check the body for queries + if node.Body != nil { + violations = append(violations, d.checkBlockForQueries(pass, node.Body, "for")...) + } + return true + + case *ast.RangeStmt: + // Entering a range loop + d.loopDepth++ + defer func() { d.loopDepth-- }() + + // Check the body for queries + if node.Body != nil { + violations = append(violations, d.checkBlockForQueries(pass, node.Body, "range")...) + } + return true + } + return true + }) + + return violations +} + +// checkBlockForQueries checks a block statement for SQL query calls. +func (d *N1Detector) checkBlockForQueries(pass *analysis.Pass, block *ast.BlockStmt, loopType string) []N1Violation { + var violations []N1Violation + + ast.Inspect(block, func(n ast.Node) bool { + // Skip nested loops - they'll be handled separately + switch n.(type) { + case *ast.ForStmt, *ast.RangeStmt: + return false + } + + call, ok := n.(*ast.CallExpr) + if !ok { + return true + } + + methodName := d.getMethodName(call) + if methodName == "" { + return true + } + + // Check 1: Direct query method call + if d.queryMethods[methodName] { + if v := d.checkDirectQueryCall(call, methodName, loopType); v != nil { + violations = append(violations, *v) + } + return true + } + + // Check 2: ORM-specific method call + if d.ormMethods[methodName] { + if v := d.checkORMMethodCall(call, methodName, loopType); v != nil { + violations = append(violations, *v) + } + return true + } + + // Check 3: Transaction method in loop (potential issue) + if d.transactionMethods[methodName] { + violations = append(violations, N1Violation{ + Pos: call.Pos(), + End: call.End(), + Message: "transaction started inside loop - consider batching operations", + LoopType: loopType, + QueryType: methodName, + Severity: N1SeverityMedium, + Suggestion: "Move transaction outside the loop and batch operations, or use a single transaction for all iterations", + }) + return true + } + + // Check 4: Indirect query via function call + if v := d.checkIndirectQueryCall(call, methodName, loopType); v != nil { + violations = append(violations, *v) + } + + return true + }) + + return violations +} + +// checkDirectQueryCall checks for direct database query calls. +func (d *N1Detector) checkDirectQueryCall(call *ast.CallExpr, methodName, loopType string) *N1Violation { + // Check if any argument contains SELECT or other SQL keywords + hasSQLKeyword := false + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok { + if lit.Kind == token.STRING { + value := strings.ToUpper(lit.Value) + if strings.Contains(value, "SELECT") || strings.Contains(value, "INSERT") || + strings.Contains(value, "UPDATE") || strings.Contains(value, "DELETE") { + hasSQLKeyword = true + break + } + } + } + } + + // Also check if it's a method on a database variable + if !hasSQLKeyword { + hasSQLKeyword = d.mightBeQueryCall(call) + } + + if hasSQLKeyword { + return &N1Violation{ + Pos: call.Pos(), + End: call.End(), + Message: n1Message(methodName, loopType), + LoopType: loopType, + QueryType: methodName, + Severity: N1SeverityCritical, + Suggestion: n1Suggestion(loopType), + } + } + + return nil +} + +// checkORMMethodCall checks for ORM-specific method calls that might cause N+1. +func (d *N1Detector) checkORMMethodCall(call *ast.CallExpr, methodName, loopType string) *N1Violation { + // ORM methods like Preload, Association, Related are often N+1 sources + suspiciousMethods := map[string]bool{ + "Preload": true, + "Association": true, + "Related": true, + "Relation": true, + } + + if suspiciousMethods[methodName] { + return &N1Violation{ + Pos: call.Pos(), + End: call.End(), + Message: "ORM relation loading inside loop: " + methodName + "() - this causes N+1 queries", + LoopType: loopType, + QueryType: methodName, + Severity: N1SeverityHigh, + Suggestion: "Use eager loading (Preload) before the loop, or fetch all related data in a single query with JOIN", + } + } + + // Check for query execution methods + executionMethods := map[string]bool{ + "Find": true, "First": true, "Take": true, "Last": true, + "One": true, "All": true, "Only": true, "Scan": true, + } + + if executionMethods[methodName] && d.mightBeQueryCall(call) { + return &N1Violation{ + Pos: call.Pos(), + End: call.End(), + Message: "ORM query execution inside loop: " + methodName + "() - potential N+1 problem", + LoopType: loopType, + QueryType: methodName, + Severity: N1SeverityHigh, + Suggestion: "Collect IDs first, then use WHERE IN clause or batch loading", + } + } + + return nil +} + +// checkIndirectQueryCall checks for function calls that might execute queries. +func (d *N1Detector) checkIndirectQueryCall(call *ast.CallExpr, methodName, loopType string) *N1Violation { + // Check for suspicious function names that might contain queries + lowerName := strings.ToLower(methodName) + suspiciousPatterns := []string{ + "get", "fetch", "find", "load", "query", "select", + "retrieve", "lookup", "read", "search", + } + + for _, pattern := range suspiciousPatterns { + if strings.Contains(lowerName, pattern) { + // Check if it's called on a repository/store/dao object + if d.isRepositoryCall(call) { + return &N1Violation{ + Pos: call.Pos(), + End: call.End(), + Message: "potential N+1: function " + methodName + "() called inside loop may execute database query", + LoopType: loopType, + QueryType: methodName, + Severity: N1SeverityMedium, + Suggestion: "Review this function - if it executes a query, consider batch loading or caching", + IsIndirect: true, + FunctionName: methodName, + } + } + } + } + + return nil +} + +// isRepositoryCall checks if the call is on a repository-like object. +func (d *N1Detector) isRepositoryCall(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + if ident, ok := sel.X.(*ast.Ident); ok { + name := strings.ToLower(ident.Name) + repositoryPatterns := []string{ + "repo", "repository", "store", "dao", "service", + "handler", "manager", "provider", "client", + } + for _, pattern := range repositoryPatterns { + if strings.Contains(name, pattern) { + return true + } + } + } + + return false +} + +// n1Suggestion generates a suggestion based on loop type. +func n1Suggestion(loopType string) string { + switch loopType { + case "range": + return "Collect all IDs before the loop, then use a single query with IN clause:\n" + + " ids := make([]int, 0, len(items))\n" + + " for _, item := range items { ids = append(ids, item.ID) }\n" + + " db.Query(\"SELECT * FROM table WHERE id IN (?)\", ids)" + case "for": + return "Consider using batch query with IN clause or JOIN instead of querying in each iteration" + default: + return "Refactor to execute a single batch query instead of multiple queries in loop" + } +} + +// getMethodName extracts the method name from a call expression. +func (d *N1Detector) getMethodName(call *ast.CallExpr) string { + switch fun := call.Fun.(type) { + case *ast.SelectorExpr: + return fun.Sel.Name + case *ast.Ident: + return fun.Name + } + return "" +} + +// mightBeQueryCall checks if a call might be a database query. +func (d *N1Detector) mightBeQueryCall(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + // Check for common database variable names + if ident, ok := sel.X.(*ast.Ident); ok { + name := strings.ToLower(ident.Name) + return name == "db" || name == "conn" || name == "tx" || + strings.Contains(name, "database") || + strings.Contains(name, "repo") || + strings.Contains(name, "store") + } + + return false +} + +// n1Message generates a helpful message for N+1 detection. +func n1Message(methodName, loopType string) string { + suggestion := "" + switch loopType { + case "range": + suggestion = "Consider using a batch query with IN clause or JOIN" + case "for": + suggestion = "Consider collecting IDs first, then executing a single query with IN clause" + } + + return "potential N+1 query: " + methodName + "() called inside loop - " + suggestion +} + +// AnalyzeN1 is a convenience function to run N+1 detection on a file. +func AnalyzeN1(pass *analysis.Pass, file *ast.File) { + detector := NewN1Detector() + violations := detector.CheckN1Queries(pass, file) + + for _, v := range violations { + message := v.Message + if v.Suggestion != "" { + message += "\n Suggestion: " + v.Suggestion + } + if v.Severity != "" { + message = "[" + string(v.Severity) + "] " + message + } + + pass.Report(analysis.Diagnostic{ + Pos: v.Pos, + End: v.End, + Message: message, + }) + } +} + +// GetN1Violations returns all N+1 violations for external use. +func GetN1Violations(pass *analysis.Pass, file *ast.File) []N1Violation { + detector := NewN1Detector() + return detector.CheckN1Queries(pass, file) +} + +// CheckN1QueriesNoPass is a method to check for N+1 queries without analysis.Pass. +// This is useful for testing. +func (d *N1Detector) CheckN1QueriesNoPass(file *ast.File) []N1Violation { + return DetectN1InAST(nil, file) +} + +// DetectN1InAST detects N+1 query problems in an AST file without analysis.Pass. +// This is designed for use in LSP server where we don't have a full analysis pass. +func DetectN1InAST(fset *token.FileSet, file *ast.File) []N1Violation { + detector := NewN1Detector() + var violations []N1Violation + + ast.Inspect(file, func(n ast.Node) bool { + switch node := n.(type) { + case *ast.ForStmt: + detector.loopDepth++ + defer func() { detector.loopDepth-- }() + + if node.Body != nil { + violations = append(violations, detector.checkBlockForQueriesNoPass(node.Body, "for")...) + } + return true + + case *ast.RangeStmt: + detector.loopDepth++ + defer func() { detector.loopDepth-- }() + + if node.Body != nil { + violations = append(violations, detector.checkBlockForQueriesNoPass(node.Body, "range")...) + } + return true + } + return true + }) + + return violations +} + +// checkBlockForQueriesNoPass checks a block statement for SQL query calls without analysis.Pass. +func (d *N1Detector) checkBlockForQueriesNoPass(block *ast.BlockStmt, loopType string) []N1Violation { + var violations []N1Violation + + ast.Inspect(block, func(n ast.Node) bool { + switch n.(type) { + case *ast.ForStmt, *ast.RangeStmt: + return false + } + + call, ok := n.(*ast.CallExpr) + if !ok { + return true + } + + methodName := d.getMethodName(call) + if methodName == "" { + return true + } + + // Check 1: Direct query method call + if d.queryMethods[methodName] { + if v := d.checkDirectQueryCall(call, methodName, loopType); v != nil { + violations = append(violations, *v) + } + return true + } + + // Check 2: ORM-specific method call + if d.ormMethods[methodName] { + if v := d.checkORMMethodCall(call, methodName, loopType); v != nil { + violations = append(violations, *v) + } + return true + } + + // Check 3: Transaction method in loop + if d.transactionMethods[methodName] { + violations = append(violations, N1Violation{ + Pos: call.Pos(), + End: call.End(), + Message: "transaction started inside loop - consider batching operations", + LoopType: loopType, + QueryType: methodName, + Severity: N1SeverityMedium, + Suggestion: "Move transaction outside the loop and batch operations, or use a single transaction for all iterations", + }) + return true + } + + // Check 4: Indirect query via function call + if v := d.checkIndirectQueryCall(call, methodName, loopType); v != nil { + violations = append(violations, *v) + } + + return true + }) + + return violations +} diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/goqu.go b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/goqu.go new file mode 100644 index 000000000..58a14b823 --- /dev/null +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/goqu.go @@ -0,0 +1,107 @@ +package sqlbuilders + +import ( + "go/ast" + "go/token" + "strings" +) + +// GoquChecker checks for SELECT * in goqu queries. +type GoquChecker struct{} + +// NewGoquChecker creates a new goqu checker. +func NewGoquChecker() *GoquChecker { + return &GoquChecker{} +} + +// Name returns the checker name. +func (c *GoquChecker) Name() string { + return "goqu" +} + +// IsApplicable checks if the call is a goqu method. +func (c *GoquChecker) IsApplicable(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + // Check for goqu method names + methodName := sel.Sel.Name + goquMethods := map[string]bool{ + "Select": true, + "SelectAll": true, + "From": true, + "SelectDistinct": true, + } + + return goquMethods[methodName] +} + +// CheckSelectStar checks for SELECT * patterns in goqu. +func (c *GoquChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return nil + } + + methodName := sel.Sel.Name + + // goqu.From("table").SelectAll() - this selects all columns + if methodName == "SelectAll" { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "goqu SelectAll() selects all columns - use Select() with explicit column names", + } + } + + // goqu.From("table").Select("*") + if methodName == "Select" { + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"'") + if value == "*" { + return &SelectStarViolation{ + Pos: lit.Pos(), + End: lit.End(), + Message: "goqu Select(\"*\") - specify columns explicitly", + } + } + } + } + + // goqu.From("table").Select() without arguments also selects all + if len(call.Args) == 0 { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "goqu Select() without arguments selects all columns", + } + } + } + + return nil +} + +// CheckChainedCalls checks chained method calls. +func (c *GoquChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation { + var violations []*SelectStarViolation + + // Walk up the chain + current := call + for current != nil { + if v := c.CheckSelectStar(current); v != nil { + violations = append(violations, v) + } + + // Move to the receiver if it's also a call + sel, ok := current.Fun.(*ast.SelectorExpr) + if !ok { + break + } + current, _ = sel.X.(*ast.CallExpr) + } + + return violations +} diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/gorm.go b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/gorm.go index 1946ad252..143001eff 100644 --- a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/gorm.go +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/gorm.go @@ -58,88 +58,84 @@ func (c *GORMChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { return nil } - methodName := sel.Sel.Name - - // Check db.Select("*") - if methodName == "Select" { - for _, arg := range call.Args { - if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { - value := strings.Trim(lit.Value, "`\"") - if value == "*" { - return &SelectStarViolation{ - Pos: call.Pos(), - End: call.End(), - Message: "GORM Select(\"*\") - explicitly specify columns", - Builder: "gorm", - Context: "explicit_star", - } - } - // Check for SELECT * in raw SQL inside Select - upperValue := strings.ToUpper(value) - if strings.Contains(upperValue, "SELECT *") { - return &SelectStarViolation{ - Pos: call.Pos(), - End: call.End(), - Message: "GORM Select() contains SELECT * - specify columns explicitly", - Builder: "gorm", - Context: "raw_select_star", - } - } + switch sel.Sel.Name { + case "Select": + return c.checkSelectMethod(call) + case "Raw": + return c.checkRawMethod(call, "GORM Raw() with SELECT * - specify columns explicitly") + case "Exec": + return c.checkRawMethod(call, "GORM Exec() with SELECT * - specify columns explicitly") + } + + return nil +} + +// checkSelectMethod checks db.Select() for star patterns +func (c *GORMChecker) checkSelectMethod(call *ast.CallExpr) *SelectStarViolation { + for _, arg := range call.Args { + lit, ok := arg.(*ast.BasicLit) + if !ok || lit.Kind != token.STRING { + continue + } + + value := strings.Trim(lit.Value, "`\"") + if value == "*" { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "GORM Select(\"*\") - explicitly specify columns", + Builder: "gorm", + Context: "explicit_star", } } - } - // Check db.Raw("SELECT * FROM ...") - if methodName == "Raw" { - for _, arg := range call.Args { - if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { - value := strings.Trim(lit.Value, "`\"") - upperValue := strings.ToUpper(value) - if strings.Contains(upperValue, "SELECT *") { - return &SelectStarViolation{ - Pos: call.Pos(), - End: call.End(), - Message: "GORM Raw() with SELECT * - specify columns explicitly", - Builder: "gorm", - Context: "raw_select_star", - } - } + if strings.Contains(strings.ToUpper(value), "SELECT *") { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "GORM Select() contains SELECT * - specify columns explicitly", + Builder: "gorm", + Context: "raw_select_star", } } } + return nil +} + +// checkRawMethod checks db.Raw() or db.Exec() for SELECT * patterns +func (c *GORMChecker) checkRawMethod(call *ast.CallExpr, message string) *SelectStarViolation { + for _, arg := range call.Args { + lit, ok := arg.(*ast.BasicLit) + if !ok || lit.Kind != token.STRING { + continue + } - // Check db.Exec("SELECT * FROM ...") - if methodName == "Exec" { - for _, arg := range call.Args { - if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { - value := strings.Trim(lit.Value, "`\"") - upperValue := strings.ToUpper(value) - if strings.Contains(upperValue, "SELECT *") { - return &SelectStarViolation{ - Pos: call.Pos(), - End: call.End(), - Message: "GORM Exec() with SELECT * - specify columns explicitly", - Builder: "gorm", - Context: "raw_select_star", - } - } + value := strings.Trim(lit.Value, "`\"") + if strings.Contains(strings.ToUpper(value), "SELECT *") { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: message, + Builder: "gorm", + Context: "raw_select_star", } } } - return nil } // CheckChainedCalls checks method chains for SELECT * patterns. +// gormChainState tracks state while traversing GORM call chain +type gormChainState struct { + hasModel bool + hasSelect bool + modelCall *ast.CallExpr +} + func (c *GORMChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation { var violations []*SelectStarViolation + state := &gormChainState{} - // Track chain state - hasModel := false - hasSelect := false - var modelCall *ast.CallExpr - - // Traverse the call chain current := call for current != nil { sel, ok := current.Fun.(*ast.SelectorExpr) @@ -147,49 +143,10 @@ func (c *GORMChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolati break } - switch sel.Sel.Name { - case "Model", "Table": - hasModel = true - modelCall = current - case "Select": - hasSelect = true - // Check for "*" argument - for _, arg := range current.Args { - if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { - value := strings.Trim(lit.Value, "`\"") - if value == "*" { - violations = append(violations, &SelectStarViolation{ - Pos: current.Pos(), - End: current.End(), - Message: "GORM Select(\"*\") in chain - specify columns explicitly", - Builder: "gorm", - Context: "chained_star", - }) - } - } - } - case "Find", "First", "Last", "Take", "Scan": - // Terminal methods - check if we have Model without Select - if hasModel && !hasSelect && modelCall != nil { - violations = append(violations, &SelectStarViolation{ - Pos: modelCall.Pos(), - End: current.End(), - Message: "GORM Model() with Find/First without Select() defaults to SELECT *", - Builder: "gorm", - Context: "implicit_star", - }) - } - case "Preload": - // Preload often uses SELECT * for eager loading - this is common but worth flagging - if len(current.Args) > 0 { - // Only flag if there's no second argument (no custom SQL) - if len(current.Args) == 1 { - // Could add a warning about Preload SELECT * - } - } + if v := c.processGormChainMethod(sel.Sel.Name, current, state); v != nil { + violations = append(violations, v) } - // Move to the next call in the chain if innerCall, ok := sel.X.(*ast.CallExpr); ok { current = innerCall } else { @@ -199,3 +156,52 @@ func (c *GORMChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolati return violations } + +// processGormChainMethod processes a single method in the GORM call chain +func (c *GORMChecker) processGormChainMethod(methodName string, current *ast.CallExpr, state *gormChainState) *SelectStarViolation { + switch methodName { + case "Model", "Table": + state.hasModel = true + state.modelCall = current + case "Select": + state.hasSelect = true + return c.checkGormSelectArgs(current) + case "Find", "First", "Last", "Take", "Scan": + return c.checkGormTerminalMethod(current, state) + } + return nil +} + +// checkGormSelectArgs checks Select() arguments for "*" +func (c *GORMChecker) checkGormSelectArgs(current *ast.CallExpr) *SelectStarViolation { + for _, arg := range current.Args { + lit, ok := arg.(*ast.BasicLit) + if !ok || lit.Kind != token.STRING { + continue + } + if strings.Trim(lit.Value, "`\"") == "*" { + return &SelectStarViolation{ + Pos: current.Pos(), + End: current.End(), + Message: "GORM Select(\"*\") in chain - specify columns explicitly", + Builder: "gorm", + Context: "chained_star", + } + } + } + return nil +} + +// checkGormTerminalMethod checks terminal methods (Find, First, etc.) for implicit SELECT * +func (c *GORMChecker) checkGormTerminalMethod(current *ast.CallExpr, state *gormChainState) *SelectStarViolation { + if state.hasModel && !state.hasSelect && state.modelCall != nil { + return &SelectStarViolation{ + Pos: state.modelCall.Pos(), + End: current.End(), + Message: "GORM Model() with Find/First without Select() defaults to SELECT *", + Builder: "gorm", + Context: "implicit_star", + } + } + return nil +} diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/interface.go b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/interface.go index ba7646fb4..fd01cab45 100644 --- a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/interface.go +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/interface.go @@ -74,6 +74,18 @@ func NewRegistry(cfg *config.SQLBuildersConfig) *Registry { if cfg.Jet { r.checkers = append(r.checkers, NewJetChecker()) } + if cfg.Sqlc { + r.checkers = append(r.checkers, NewSQLCChecker()) + } + if cfg.Goqu { + r.checkers = append(r.checkers, NewGoquChecker()) + } + if cfg.Rel { + r.checkers = append(r.checkers, NewRelChecker()) + } + if cfg.Reform { + r.checkers = append(r.checkers, NewReformChecker()) + } return r } diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/jet.go b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/jet.go index ff5f123de..32d05f868 100644 --- a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/jet.go +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/jet.go @@ -49,52 +49,46 @@ func (c *JetChecker) IsApplicable(call *ast.CallExpr) bool { // CheckSelectStar checks for SELECT * in jet calls. func (c *JetChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { - // Check for direct SELECT function call + // Check for direct function calls (SELECT, RawStatement) if ident, ok := call.Fun.(*ast.Ident); ok { - if ident.Name == "SELECT" { - // Check arguments for AllColumns or STAR - for _, arg := range call.Args { - if c.isAllColumnsOrStar(arg) { - return &SelectStarViolation{ - Pos: call.Pos(), - End: call.End(), - Message: "Jet SELECT with AllColumns/STAR - specify columns explicitly", - Builder: "jet", - Context: "explicit_star", - } - } - } - } + return c.checkIdentCall(call, ident) + } - if ident.Name == "RawStatement" { - // Check for SELECT * in raw statement - for _, arg := range call.Args { - if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { - value := strings.Trim(lit.Value, "`\"") - upperValue := strings.ToUpper(value) - if strings.Contains(upperValue, "SELECT *") { - return &SelectStarViolation{ - Pos: call.Pos(), - End: call.End(), - Message: "Jet RawStatement with SELECT * - specify columns explicitly", - Builder: "jet", - Context: "raw_select_star", - } - } + // Check for selector calls (table.AllColumns, pkg.Star, etc.) + if sel, ok := call.Fun.(*ast.SelectorExpr); ok { + return c.checkSelectorCall(call, sel) + } + + return nil +} + +// checkIdentCall handles direct function calls like SELECT() or RawStatement() +func (c *JetChecker) checkIdentCall(call *ast.CallExpr, ident *ast.Ident) *SelectStarViolation { + switch ident.Name { + case "SELECT": + for _, arg := range call.Args { + if c.isAllColumnsOrStar(arg) { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "Jet SELECT with AllColumns/STAR - specify columns explicitly", + Builder: "jet", + Context: "explicit_star", } } } + case "RawStatement": + return c.checkRawStatementArgs(call, "Jet RawStatement with SELECT * - specify columns explicitly") } + return nil +} - sel, ok := call.Fun.(*ast.SelectorExpr) - if !ok { - return nil - } - +// checkSelectorCall handles selector calls like table.AllColumns or pkg.Star +func (c *JetChecker) checkSelectorCall(call *ast.CallExpr, sel *ast.SelectorExpr) *SelectStarViolation { methodName := sel.Sel.Name - // Check for table.AllColumns - if methodName == "AllColumns" { + switch methodName { + case "AllColumns": return &SelectStarViolation{ Pos: call.Pos(), End: call.End(), @@ -102,10 +96,7 @@ func (c *JetChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { Builder: "jet", Context: "all_columns", } - } - - // Check for STAR constant usage - if methodName == "Star" { + case "Star": return &SelectStarViolation{ Pos: call.Pos(), End: call.End(), @@ -113,27 +104,29 @@ func (c *JetChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { Builder: "jet", Context: "explicit_star", } + case "RawStatement", "Raw": + return c.checkRawStatementArgs(call, "Jet Raw/RawStatement with SELECT * - specify columns explicitly") } - // Check RawStatement - if methodName == "RawStatement" || methodName == "Raw" { - for _, arg := range call.Args { - if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { - value := strings.Trim(lit.Value, "`\"") - upperValue := strings.ToUpper(value) - if strings.Contains(upperValue, "SELECT *") { - return &SelectStarViolation{ - Pos: call.Pos(), - End: call.End(), - Message: "Jet Raw/RawStatement with SELECT * - specify columns explicitly", - Builder: "jet", - Context: "raw_select_star", - } + return nil +} + +// checkRawStatementArgs checks for SELECT * in raw statement arguments +func (c *JetChecker) checkRawStatementArgs(call *ast.CallExpr, message string) *SelectStarViolation { + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + if strings.Contains(strings.ToUpper(value), "SELECT *") { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: message, + Builder: "jet", + Context: "raw_select_star", } } } } - return nil } diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/pgx.go b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/pgx.go index 9b44fc156..7a7a97d4f 100644 --- a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/pgx.go +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/pgx.go @@ -53,18 +53,15 @@ func (c *PGXChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { methodName := sel.Sel.Name // pgx methods where the SQL query is typically the second argument (after context) - queryArgIndex := 1 + // conn.Query(ctx, sql, args...), conn.QueryFunc(ctx, sql, args, func...) switch methodName { - case "Query", "QueryRow", "Exec", "Prepare": - // conn.Query(ctx, sql, args...) - queryArgIndex = 1 - case "QueryFunc": - // conn.QueryFunc(ctx, sql, args, func...) - queryArgIndex = 1 + case "Query", "QueryRow", "Exec", "Prepare", "QueryFunc": + // supported methods default: return nil } + const queryArgIndex = 1 if queryArgIndex >= len(call.Args) { return nil } diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/reform.go b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/reform.go new file mode 100644 index 000000000..e9921c096 --- /dev/null +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/reform.go @@ -0,0 +1,240 @@ +package sqlbuilders + +import ( + "go/ast" + "go/token" + "strings" + + "golang.org/x/tools/go/analysis" +) + +// ReformChecker detects SELECT * patterns in gopkg.in/reform.v1 queries. +// https://github.com/go-reform/reform +type ReformChecker struct{} + +// NewReformChecker creates a new reform checker. +func NewReformChecker() *ReformChecker { + return &ReformChecker{} +} + +// Name returns the name of the SQL builder. +func (c *ReformChecker) Name() string { + return "reform" +} + +// IsApplicable checks if the call expression might be from reform. +func (c *ReformChecker) IsApplicable(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + method := sel.Sel.Name + switch method { + case "FindByPrimaryKeyFrom", "FindOneFrom", "FindAllFrom", + "SelectOneFrom", "SelectAllFrom", "SelectRows": + return c.isReformDB(sel.X) || c.isQuerier(sel.X) + } + return false +} + +// CheckSelectStar checks a single call expression for SELECT * usage. +func (c *ReformChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { + v := c.checkCall(call) + if v == nil { + return nil + } + + return &SelectStarViolation{ + Pos: v.Pos, + End: v.End, + Message: v.Message, + Builder: "reform", + Context: v.Method, + } +} + +// CheckChainedCalls analyzes method chains for SELECT * patterns. +func (c *ReformChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation { + // reform doesn't typically use method chaining for SELECT * + return nil +} + +// Check analyzes a file for reform SELECT * patterns. +func (c *ReformChecker) Check(pass *analysis.Pass, file *ast.File) { + ast.Inspect(file, func(n ast.Node) bool { + call, ok := n.(*ast.CallExpr) + if !ok { + return true + } + + if v := c.checkCall(call); v != nil { + pass.Report(analysis.Diagnostic{ + Pos: v.Pos, + End: v.End, + Message: v.Message, + }) + } + + return true + }) +} + +// ReformViolation represents a reform SELECT * violation. +type ReformViolation struct { + Pos token.Pos + End token.Pos + Message string + Method string +} + +// checkCall checks a call expression for reform SELECT * patterns. +func (c *ReformChecker) checkCall(call *ast.CallExpr) *ReformViolation { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return nil + } + + method := sel.Sel.Name + + // reform patterns that load all columns: + // - db.FindByPrimaryKeyFrom(table, pk, &record) + // - db.FindOneFrom(table, column, value, &record) + // - db.FindAllFrom(table, column, values...) + // - db.SelectOneFrom(table, tail, args...) - if tail doesn't specify columns + // - db.SelectAllFrom(table, tail, args...) - if tail doesn't specify columns + // - querier.SelectRows(tail, args...) - may need column specification + + switch method { + case "FindByPrimaryKeyFrom", "FindOneFrom", "FindAllFrom": + // These methods always load all columns + if c.isReformDB(sel.X) { + return &ReformViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "reform: " + method + " loads all columns - consider using SelectAllFrom with specific columns", + Method: method, + } + } + + case "SelectOneFrom", "SelectAllFrom": + // Check if the tail argument specifies columns + if c.isReformDB(sel.X) && !c.hasColumnSpecification(call) { + return &ReformViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "reform: " + method + " should specify columns in the tail argument", + Method: method, + } + } + + case "SelectRows": + // Check querier.SelectRows + if c.isQuerier(sel.X) && !c.hasSelectClause(call) { + return &ReformViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "reform: SelectRows query may select all columns - verify column specification", + Method: method, + } + } + } + + return nil +} + +// isReformDB checks if the expression is a reform DB. +func (c *ReformChecker) isReformDB(expr ast.Expr) bool { + if ident, ok := expr.(*ast.Ident); ok { + name := ident.Name + return name == "db" || name == "DB" || name == "querier" || + name == "tx" || name == "Tx" + } + + if sel, ok := expr.(*ast.SelectorExpr); ok { + return sel.Sel.Name == "DB" || sel.Sel.Name == "Querier" + } + + return false +} + +// isQuerier checks if the expression is a reform Querier. +func (c *ReformChecker) isQuerier(expr ast.Expr) bool { + if ident, ok := expr.(*ast.Ident); ok { + name := ident.Name + return name == "querier" || name == "q" || name == "db" || name == "tx" + } + + return false +} + +// hasColumnSpecification checks if the call specifies columns. +func (c *ReformChecker) hasColumnSpecification(call *ast.CallExpr) bool { + // The tail argument (usually second) should specify columns + // e.g., "WHERE id = ? ORDER BY name" doesn't specify columns + // but "id, name WHERE id = ?" does + + // Find the tail argument (string) + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + tail := strings.Trim(lit.Value, "`\"") + tailUpper := strings.ToUpper(tail) + + // Check if tail starts with column names (not WHERE, ORDER BY, etc.) + if strings.HasPrefix(tailUpper, "WHERE") || + strings.HasPrefix(tailUpper, "ORDER") || + strings.HasPrefix(tailUpper, "LIMIT") || + strings.HasPrefix(tailUpper, "GROUP") || + strings.HasPrefix(tailUpper, "HAVING") || + tail == "" { + return false + } + + // If it doesn't start with common clauses, assume it has columns + return true + } + } + + return false +} + +// hasSelectClause checks if a SelectRows call has a proper SELECT clause. +func (c *ReformChecker) hasSelectClause(call *ast.CallExpr) bool { + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + query := strings.ToUpper(strings.Trim(lit.Value, "`\"")) + + // Check if query has SELECT with specific columns (not *) + if strings.Contains(query, "SELECT") { + if strings.Contains(query, "SELECT *") || + strings.Contains(query, "SELECT\t*") || + strings.Contains(query, "SELECT\n*") { + return false + } + return true + } + } + } + + return false +} + +// CheckFile checks a file and returns violations. +func (c *ReformChecker) CheckFile(file *ast.File, fset *token.FileSet) []ReformViolation { + var violations []ReformViolation + + ast.Inspect(file, func(n ast.Node) bool { + call, ok := n.(*ast.CallExpr) + if !ok { + return true + } + + if v := c.checkCall(call); v != nil { + violations = append(violations, *v) + } + + return true + }) + + return violations +} diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/rel.go b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/rel.go new file mode 100644 index 000000000..16804d762 --- /dev/null +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/rel.go @@ -0,0 +1,228 @@ +package sqlbuilders + +import ( + "go/ast" + "go/token" + + "golang.org/x/tools/go/analysis" +) + +// RelChecker detects SELECT * patterns in go-rel/rel queries. +// https://github.com/go-rel/rel +type RelChecker struct{} + +// NewRelChecker creates a new rel checker. +func NewRelChecker() *RelChecker { + return &RelChecker{} +} + +// Name returns the name of the SQL builder. +func (c *RelChecker) Name() string { + return "rel" +} + +// IsApplicable checks if the call expression might be from rel. +func (c *RelChecker) IsApplicable(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + method := sel.Sel.Name + switch method { + case "Find", "FindAll", "FindAndCountAll", "All", "One": + return c.isRelRepository(sel.X) + } + return false +} + +// CheckSelectStar checks a single call expression for SELECT * usage. +func (c *RelChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { + if !c.isSelectAllPattern(call) { + return nil + } + + sel := call.Fun.(*ast.SelectorExpr) + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "rel: query loads all columns - consider using Select() to specify columns", + Builder: "rel", + Context: sel.Sel.Name, + } +} + +// CheckChainedCalls analyzes method chains for SELECT * patterns. +func (c *RelChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation { + // rel doesn't typically use method chaining for SELECT * + return nil +} + +// Check analyzes a file for rel SELECT * patterns. +func (c *RelChecker) Check(pass *analysis.Pass, file *ast.File) { + ast.Inspect(file, func(n ast.Node) bool { + call, ok := n.(*ast.CallExpr) + if !ok { + return true + } + + // Check for rel patterns that load all columns + if c.isSelectAllPattern(call) { + pass.Report(analysis.Diagnostic{ + Pos: call.Pos(), + End: call.End(), + Message: "rel: query loads all columns - consider using Select() to specify columns", + }) + } + + return true + }) +} + +// isSelectAllPattern checks if a call represents a SELECT * pattern in rel. +func (c *RelChecker) isSelectAllPattern(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + method := sel.Sel.Name + + // rel patterns that load all columns by default: + // - repo.Find(ctx, &user) - loads all columns + // - repo.FindAll(ctx, &users) - loads all columns + // - repo.FindAndCountAll(ctx, &users) - loads all columns + // - rel.From("users").All(ctx, &users) - loads all columns without Select() + + switch method { + case "Find", "FindAll", "FindAndCountAll": + // These methods load all columns unless combined with Select() + // Check if this is a call on a rel repository + if c.isRelRepository(sel.X) { + // Check if the query chain includes Select() + if !c.hasSelectInChain(call) { + return true + } + } + + case "All", "One": + // Check if this is part of a query builder chain without Select() + if c.isQueryBuilderWithoutSelect(sel.X) { + return true + } + } + + return false +} + +// isRelRepository checks if the expression is a rel repository. +func (c *RelChecker) isRelRepository(expr ast.Expr) bool { + // Check for common rel repository variable names + if ident, ok := expr.(*ast.Ident); ok { + name := ident.Name + return name == "repo" || name == "repository" || + name == "r" || name == "db" + } + + // Check for selector on repo + if sel, ok := expr.(*ast.SelectorExpr); ok { + return c.isRelRepository(sel.X) + } + + return false +} + +// hasSelectInChain checks if Select() is used in the query chain. +func (c *RelChecker) hasSelectInChain(call *ast.CallExpr) bool { + // Walk up the chain looking for Select() + current := call.Fun + for { + sel, ok := current.(*ast.SelectorExpr) + if !ok { + break + } + + if sel.Sel.Name == "Select" { + return true + } + + // Check if the receiver is a call expression (method chain) + if callExpr, ok := sel.X.(*ast.CallExpr); ok { + if innerSel, ok := callExpr.Fun.(*ast.SelectorExpr); ok { + if innerSel.Sel.Name == "Select" { + return true + } + } + current = callExpr.Fun + } else { + break + } + } + + return false +} + +// isQueryBuilderWithoutSelect checks if an expression is a query builder without Select(). +func (c *RelChecker) isQueryBuilderWithoutSelect(expr ast.Expr) bool { + // Walk the call chain looking for From() without Select() + hasFrom := false + hasSelect := false + + current := expr + for { + call, ok := current.(*ast.CallExpr) + if !ok { + break + } + + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + break + } + + switch sel.Sel.Name { + case "From": + hasFrom = true + case "Select": + hasSelect = true + } + + current = sel.X + } + + return hasFrom && !hasSelect +} + +// RelViolation represents a rel SELECT * violation. +type RelViolation struct { + Pos token.Pos + End token.Pos + Message string + Method string +} + +// CheckFile checks a file and returns violations. +func (c *RelChecker) CheckFile(file *ast.File, fset *token.FileSet) []RelViolation { + var violations []RelViolation + + ast.Inspect(file, func(n ast.Node) bool { + call, ok := n.(*ast.CallExpr) + if !ok { + return true + } + + if c.isSelectAllPattern(call) { + sel := call.Fun.(*ast.SelectorExpr) + violations = append(violations, RelViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "rel: query loads all columns - consider using Select()", + Method: sel.Sel.Name, + }) + } + + return true + }) + + return violations +} diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/sqlc.go b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/sqlc.go new file mode 100644 index 000000000..3a41d2354 --- /dev/null +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/sqlc.go @@ -0,0 +1,72 @@ +package sqlbuilders + +import ( + "go/ast" + "go/token" + "strings" +) + +// SQLCChecker checks for SELECT * in sqlc generated code. +type SQLCChecker struct{} + +// NewSQLCChecker creates a new sqlc checker. +func NewSQLCChecker() *SQLCChecker { + return &SQLCChecker{} +} + +// Name returns the checker name. +func (c *SQLCChecker) Name() string { + return "sqlc" +} + +// IsApplicable checks if the call is from sqlc generated code. +func (c *SQLCChecker) IsApplicable(call *ast.CallExpr) bool { + // sqlc generates code with patterns like: + // - Queries struct methods + // - db.QueryRow or db.Query with specific patterns + + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + // Check for common sqlc patterns + methodName := sel.Sel.Name + sqlcMethods := []string{ + "GetUser", "ListUsers", "CreateUser", "UpdateUser", "DeleteUser", + "Get", "List", "Create", "Update", "Delete", "Find", "Search", + } + + for _, m := range sqlcMethods { + if strings.Contains(methodName, m) { + return true + } + } + + return false +} + +// CheckSelectStar checks for SELECT * in the call. +func (c *SQLCChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolation { + // sqlc doesn't typically have SELECT * visible in Go code + // but we can check string arguments + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.ToUpper(lit.Value) + if strings.Contains(value, "SELECT *") || strings.Contains(value, "SELECT\t*") { + return &SelectStarViolation{ + Pos: lit.Pos(), + End: lit.End(), + Message: "sqlc query contains SELECT * - specify columns explicitly in your .sql file", + } + } + } + } + return nil +} + +// CheckChainedCalls checks chained method calls. +func (c *SQLCChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation { + // sqlc doesn't typically use chained calls + return nil +} diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/squirrel.go b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/squirrel.go index cb2e4ccaf..5942653aa 100644 --- a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/squirrel.go +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqlbuilders/squirrel.go @@ -110,75 +110,28 @@ func (c *SquirrelChecker) CheckSelectStar(call *ast.CallExpr) *SelectStarViolati } // CheckChainedCalls checks method chains for SELECT * patterns. +// squirrelChainState tracks state while traversing call chain +type squirrelChainState struct { + hasSelect bool + hasColumns bool + selectCall *ast.CallExpr +} + func (c *SquirrelChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarViolation { var violations []*SelectStarViolation + state := &squirrelChainState{} - // Traverse the call chain current := call - hasSelect := false - hasColumns := false - var selectCall *ast.CallExpr - for current != nil { sel, ok := current.Fun.(*ast.SelectorExpr) if !ok { break } - switch sel.Sel.Name { - case "Select": - hasSelect = true - selectCall = current - // Check if Select has arguments - if len(current.Args) > 0 { - hasColumns = true - // Check for "*" argument - for _, arg := range current.Args { - if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { - value := strings.Trim(lit.Value, "`\"") - if value == "*" { - violations = append(violations, &SelectStarViolation{ - Pos: current.Pos(), - End: current.End(), - Message: "Squirrel Select(\"*\") in chain - specify columns explicitly", - Builder: "squirrel", - Context: "chained_star", - }) - } - } - } - } - case "Columns", "Column": - hasColumns = true - // Check for "*" in Columns/Column - for _, arg := range current.Args { - if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { - value := strings.Trim(lit.Value, "`\"") - if value == "*" { - violations = append(violations, &SelectStarViolation{ - Pos: current.Pos(), - End: current.End(), - Message: "Squirrel Columns(\"*\") in chain - specify columns explicitly", - Builder: "squirrel", - Context: "chained_star", - }) - } - } - } - case "From", "Where", "Join", "LeftJoin", "RightJoin", "InnerJoin": - // Terminal methods - check if we have Select without columns - if hasSelect && !hasColumns && selectCall != nil && len(selectCall.Args) == 0 { - violations = append(violations, &SelectStarViolation{ - Pos: selectCall.Pos(), - End: selectCall.End(), - Message: "Squirrel Select() without columns in chain defaults to SELECT *", - Builder: "squirrel", - Context: "empty_select_chain", - }) - } + if v := c.processChainMethod(sel.Sel.Name, current, state); v != nil { + violations = append(violations, v) } - // Move to the next call in the chain if innerCall, ok := sel.X.(*ast.CallExpr); ok { current = innerCall } else { @@ -188,3 +141,71 @@ func (c *SquirrelChecker) CheckChainedCalls(call *ast.CallExpr) []*SelectStarVio return violations } + +// processChainMethod processes a single method in the call chain +func (c *SquirrelChecker) processChainMethod(methodName string, current *ast.CallExpr, state *squirrelChainState) *SelectStarViolation { + switch methodName { + case "Select": + return c.handleSelectMethod(current, state) + case "Columns", "Column": + return c.handleColumnsMethod(current, state) + case "From", "Where", "Join", "LeftJoin", "RightJoin", "InnerJoin": + return c.handleTerminalMethod(state) + } + return nil +} + +// handleSelectMethod handles Select() calls in chain +func (c *SquirrelChecker) handleSelectMethod(current *ast.CallExpr, state *squirrelChainState) *SelectStarViolation { + state.hasSelect = true + state.selectCall = current + + if len(current.Args) == 0 { + return nil + } + + state.hasColumns = true + if v := c.checkArgsForStar(current, "Squirrel Select(\"*\") in chain - specify columns explicitly"); v != nil { + return v + } + return nil +} + +// handleColumnsMethod handles Columns()/Column() calls in chain +func (c *SquirrelChecker) handleColumnsMethod(current *ast.CallExpr, state *squirrelChainState) *SelectStarViolation { + state.hasColumns = true + return c.checkArgsForStar(current, "Squirrel Columns(\"*\") in chain - specify columns explicitly") +} + +// handleTerminalMethod handles terminal methods (From, Where, Join, etc.) +func (c *SquirrelChecker) handleTerminalMethod(state *squirrelChainState) *SelectStarViolation { + if state.hasSelect && !state.hasColumns && state.selectCall != nil && len(state.selectCall.Args) == 0 { + return &SelectStarViolation{ + Pos: state.selectCall.Pos(), + End: state.selectCall.End(), + Message: "Squirrel Select() without columns in chain defaults to SELECT *", + Builder: "squirrel", + Context: "empty_select_chain", + } + } + return nil +} + +// checkArgsForStar checks if any argument is "*" +func (c *SquirrelChecker) checkArgsForStar(call *ast.CallExpr, message string) *SelectStarViolation { + for _, arg := range call.Args { + if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.Trim(lit.Value, "`\"") + if value == "*" { + return &SelectStarViolation{ + Pos: call.Pos(), + End: call.End(), + Message: message, + Builder: "squirrel", + Context: "chained_star", + } + } + } + } + return nil +} diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqli_scanner.go b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqli_scanner.go new file mode 100644 index 000000000..2ed4ff7c9 --- /dev/null +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/internal/analyzer/sqli_scanner.go @@ -0,0 +1,603 @@ +package analyzer + +import ( + "go/ast" + "go/token" + "regexp" + "strings" + + "golang.org/x/tools/go/analysis" +) + +// SQLISeverity represents the severity level of SQL injection vulnerability. +type SQLISeverity string + +const ( + SQLISeverityCritical SQLISeverity = "critical" // Direct user input in query + SQLISeverityHigh SQLISeverity = "high" // Format string with variables + SQLISeverityMedium SQLISeverity = "medium" // String concatenation + SQLISeverityLow SQLISeverity = "low" // Potential issue, needs review +) + +// SQLInjectionScanner detects potential SQL injection vulnerabilities. +type SQLInjectionScanner struct { + // dangerousFuncs are functions that format strings (potential SQL injection vectors) + dangerousFuncs map[string]map[string]bool // package -> function -> bool + // queryFuncs are database query functions + queryFuncs map[string]bool + // ormQueryMethods are ORM-specific query methods + ormQueryMethods map[string]bool + // taintedVariables tracks variables that might contain user input + taintedVariables map[string]bool + // userInputPatterns are variable name patterns that suggest user input + userInputPatterns []string + // httpInputFuncs are functions that read HTTP input + httpInputFuncs map[string]map[string]bool +} + +// SQLInjectionViolation represents a detected SQL injection vulnerability. +type SQLInjectionViolation struct { + Pos token.Pos + End token.Pos + Message string + Severity SQLISeverity + VulnType string // "concat", "sprintf", "exec", "tainted", "orm_raw" + Suggestion string + CodeFix string // Suggested code fix +} + +// NewSQLInjectionScanner creates a new SQL injection scanner. +func NewSQLInjectionScanner() *SQLInjectionScanner { + return &SQLInjectionScanner{ + dangerousFuncs: map[string]map[string]bool{ + "fmt": { + "Sprintf": true, + "Fprintf": true, + "Printf": true, + "Errorf": true, + "Sscanf": true, + }, + "strings": { + "Join": true, + "Replace": true, + "ReplaceAll": true, + "Builder": true, + }, + "strconv": { + "Itoa": true, + "FormatInt": true, + }, + }, + queryFuncs: map[string]bool{ + // Standard database/sql + "Query": true, + "QueryRow": true, + "Exec": true, + "ExecContext": true, + "QueryContext": true, + "QueryRowContext": true, + "Prepare": true, + "PrepareContext": true, + // SQLx + "QueryRowx": true, + "Queryx": true, + "MustExec": true, + "NamedExec": true, + "NamedQuery": true, + "NamedExecContext": true, + "NamedQueryContext": true, + "Get": true, + "Select": true, + "GetContext": true, + "SelectContext": true, + // GORM + "Raw": true, + "Where": true, + "Having": true, + "Order": true, + "Group": true, + "Joins": true, + // Bun + "NewRaw": true, + "ColumnExpr": true, + "WhereOr": true, + // PGX + "SendBatch": true, + }, + ormQueryMethods: map[string]bool{ + // GORM dangerous methods when used with string concat + "Raw": true, + "Exec": true, + "Where": true, + "Or": true, + "Not": true, + "Having": true, + "Order": true, + "Group": true, + "Joins": true, + // Bun + "NewRaw": true, + "WhereOr": true, + "ColumnExpr": true, + "TableExpr": true, + }, + taintedVariables: make(map[string]bool), + userInputPatterns: []string{ + "user", "input", "param", "query", "search", "filter", + "id", "name", "email", "password", "username", "request", + "body", "form", "data", "value", "arg", "args", + "q", "s", "term", "keyword", "text", "content", + }, + httpInputFuncs: map[string]map[string]bool{ + "http": { + "Request": true, + }, + "gin": { + "Param": true, + "Query": true, + "PostForm": true, + "DefaultQuery": true, + "GetQuery": true, + "BindJSON": true, + "ShouldBind": true, + }, + "echo": { + "Param": true, + "QueryParam": true, + "FormValue": true, + "Bind": true, + }, + "fiber": { + "Params": true, + "Query": true, + "FormValue": true, + "BodyParser": true, + }, + "chi": { + "URLParam": true, + }, + "mux": { + "Vars": true, + }, + }, + } +} + +// SQL pattern for identifying SQL-like strings +var sqlPattern = regexp.MustCompile(`(?i)(SELECT|INSERT|UPDATE|DELETE|DROP|CREATE|ALTER|TRUNCATE)\s+`) + +// Placeholder patterns for parameterized queries +var placeholderPattern = regexp.MustCompile(`(\?|\$\d+|:\w+|@\w+)`) + +// ScanFile scans a file for SQL injection vulnerabilities. +func (s *SQLInjectionScanner) ScanFile(pass *analysis.Pass, file *ast.File) []SQLInjectionViolation { + var violations []SQLInjectionViolation + + ast.Inspect(file, func(n ast.Node) bool { + switch node := n.(type) { + case *ast.CallExpr: + // Check for dangerous patterns + if v := s.checkCallExpr(node); v != nil { + violations = append(violations, *v) + } + case *ast.BinaryExpr: + // Check for string concatenation in SQL context + if v := s.checkBinaryExpr(node); v != nil { + violations = append(violations, *v) + } + } + return true + }) + + return violations +} + +// checkCallExpr checks a function call for SQL injection patterns. +func (s *SQLInjectionScanner) checkCallExpr(call *ast.CallExpr) *SQLInjectionViolation { + // Check if this is a query function call + methodName := s.getMethodName(call) + if !s.queryFuncs[methodName] && !s.ormQueryMethods[methodName] { + return nil + } + + // If this is a parameterized query (first arg is string literal with placeholders, + // subsequent args are parameters), it's safe + if s.isParameterizedQuery(call) { + return nil + } + + // Check arguments for dangerous patterns + for _, arg := range call.Args { + // Pattern 1: fmt.Sprintf result used as query + if innerCall, ok := arg.(*ast.CallExpr); ok { + if s.isDangerousFormatCall(innerCall) { + if s.containsUserInput(innerCall) { + return &SQLInjectionViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "SQL INJECTION: fmt.Sprintf with user input passed to " + methodName + "()", + Severity: SQLISeverityCritical, + VulnType: "sprintf", + Suggestion: "Use parameterized queries with placeholders (?, $1, :name)", + CodeFix: s.generateParameterizedFix(methodName, arg), + } + } + // Even without detected user input, format strings are suspicious + return &SQLInjectionViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "potential SQL injection: fmt.Sprintf result passed to " + methodName + "() - use parameterized queries", + Severity: SQLISeverityHigh, + VulnType: "sprintf", + Suggestion: "Replace fmt.Sprintf with parameterized query using placeholders", + CodeFix: s.generateParameterizedFix(methodName, arg), + } + } + // Check for HTTP input functions + if s.isHTTPInputCall(innerCall) { + return &SQLInjectionViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "SQL INJECTION: HTTP input directly used in " + methodName + "()", + Severity: SQLISeverityCritical, + VulnType: "tainted", + Suggestion: "Never use HTTP input directly in SQL - always use parameterized queries", + } + } + } + + // Pattern 2: String concatenation used as query + if binExpr, ok := arg.(*ast.BinaryExpr); ok { + if binExpr.Op == token.ADD { + if s.containsTaintedVariable(binExpr) { + return &SQLInjectionViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "SQL INJECTION: string concatenation with user input in " + methodName + "()", + Severity: SQLISeverityCritical, + VulnType: "concat", + Suggestion: "Use parameterized queries instead of string concatenation", + CodeFix: "Replace: db." + methodName + "(\"SELECT * FROM users WHERE id = \" + id)\nWith: db." + methodName + "(\"SELECT * FROM users WHERE id = ?\", id)", + } + } + if s.containsStringVariable(binExpr) { + return &SQLInjectionViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "potential SQL injection: string concatenation in " + methodName + "()", + Severity: SQLISeverityHigh, + VulnType: "concat", + Suggestion: "Use parameterized queries instead of string concatenation", + } + } + } + } + + // Pattern 3: Tainted variable used directly + if ident, ok := arg.(*ast.Ident); ok { + if s.isTaintedVariable(ident.Name) { + return &SQLInjectionViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "SQL INJECTION: potentially tainted variable '" + ident.Name + "' used in " + methodName + "()", + Severity: SQLISeverityHigh, + VulnType: "tainted", + Suggestion: "Validate and sanitize '" + ident.Name + "' or use parameterized queries", + } + } + if s.mightBeDynamicQuery(ident) { + return &SQLInjectionViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "review SQL query in " + methodName + "(): ensure '" + ident.Name + "' is not built with user input", + Severity: SQLISeverityMedium, + VulnType: "variable", + Suggestion: "Audit the construction of '" + ident.Name + "' to ensure it doesn't contain user input", + } + } + } + } + + // Pattern 4: ORM Raw methods with string variables + if s.ormQueryMethods[methodName] { + if v := s.checkORMRawMethod(call, methodName); v != nil { + return v + } + } + + return nil +} + +// checkORMRawMethod checks ORM-specific raw SQL methods. +func (s *SQLInjectionScanner) checkORMRawMethod(call *ast.CallExpr, methodName string) *SQLInjectionViolation { + // Methods like db.Raw(), db.Where() with string concatenation + if len(call.Args) == 0 { + return nil + } + + firstArg := call.Args[0] + + // Check if first argument is a string literal (safe) or variable (needs review) + if _, ok := firstArg.(*ast.BasicLit); !ok { + // Not a string literal - might be dangerous + if ident, ok := firstArg.(*ast.Ident); ok { + if s.isTaintedVariable(ident.Name) { + return &SQLInjectionViolation{ + Pos: call.Pos(), + End: call.End(), + Message: "SQL INJECTION risk: " + methodName + "() with potentially tainted variable", + Severity: SQLISeverityHigh, + VulnType: "orm_raw", + Suggestion: "Use parameterized syntax: db." + methodName + "(\"field = ?\", value)", + } + } + } + } + + return nil +} + +// generateParameterizedFix generates a suggested fix for sprintf patterns. +func (s *SQLInjectionScanner) generateParameterizedFix(methodName string, arg ast.Expr) string { + return "Replace fmt.Sprintf with parameterized query:\n" + + " Before: db." + methodName + "(fmt.Sprintf(\"SELECT * FROM users WHERE id = %d\", id))\n" + + " After: db." + methodName + "(\"SELECT * FROM users WHERE id = ?\", id)" +} + +// isHTTPInputCall checks if a call is reading HTTP input. +func (s *SQLInjectionScanner) isHTTPInputCall(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + methodName := sel.Sel.Name + + // Check for common HTTP input methods + httpMethods := map[string]bool{ + "Param": true, "Query": true, "PostForm": true, + "FormValue": true, "QueryParam": true, "Params": true, + "GetQuery": true, "DefaultQuery": true, "BodyParser": true, + "Bind": true, "BindJSON": true, "ShouldBind": true, + "URLParam": true, "Vars": true, + } + + return httpMethods[methodName] +} + +// isTaintedVariable checks if a variable name suggests user input. +func (s *SQLInjectionScanner) isTaintedVariable(name string) bool { + lowerName := strings.ToLower(name) + for _, pattern := range s.userInputPatterns { + if strings.Contains(lowerName, pattern) { + return true + } + } + return s.taintedVariables[name] +} + +// containsTaintedVariable checks if an expression contains tainted variables. +func (s *SQLInjectionScanner) containsTaintedVariable(expr ast.Expr) bool { + hasTainted := false + + ast.Inspect(expr, func(n ast.Node) bool { + if ident, ok := n.(*ast.Ident); ok { + if s.isTaintedVariable(ident.Name) { + hasTainted = true + return false + } + } + return true + }) + + return hasTainted +} + +// MarkVariableAsTainted marks a variable as containing user input. +func (s *SQLInjectionScanner) MarkVariableAsTainted(name string) { + s.taintedVariables[name] = true +} + +// isParameterizedQuery checks if a call uses parameterized query syntax. +// A parameterized query has a string literal with placeholders (?, $1, :name, @param) +// as the first argument, with subsequent arguments providing the values. +func (s *SQLInjectionScanner) isParameterizedQuery(call *ast.CallExpr) bool { + if len(call.Args) < 2 { + return false + } + + // First argument should be a string literal + firstArg := call.Args[0] + lit, ok := firstArg.(*ast.BasicLit) + if !ok || lit.Kind != token.STRING { + return false + } + + // Check if the string contains placeholder patterns + queryStr := lit.Value + return placeholderPattern.MatchString(queryStr) +} + +// checkBinaryExpr checks string concatenation for SQL injection. +func (s *SQLInjectionScanner) checkBinaryExpr(expr *ast.BinaryExpr) *SQLInjectionViolation { + if expr.Op != token.ADD { + return nil + } + + // Check if this looks like SQL concatenation + if s.isSQLStringConcat(expr) && s.containsStringVariable(expr) { + return &SQLInjectionViolation{ + Pos: expr.Pos(), + End: expr.End(), + Message: "potential SQL injection: string concatenation with SQL keywords - use parameterized queries", + Severity: SQLISeverityMedium, + VulnType: "concat", + } + } + + return nil +} + +// getMethodName extracts the method name from a call expression. +func (s *SQLInjectionScanner) getMethodName(call *ast.CallExpr) string { + switch fun := call.Fun.(type) { + case *ast.SelectorExpr: + return fun.Sel.Name + case *ast.Ident: + return fun.Name + } + return "" +} + +// isDangerousFormatCall checks if a call is to a dangerous format function. +func (s *SQLInjectionScanner) isDangerousFormatCall(call *ast.CallExpr) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + + pkgIdent, ok := sel.X.(*ast.Ident) + if !ok { + return false + } + + if funcs, ok := s.dangerousFuncs[pkgIdent.Name]; ok { + return funcs[sel.Sel.Name] + } + + return false +} + +// containsUserInput checks if a format call might contain user input. +func (s *SQLInjectionScanner) containsUserInput(call *ast.CallExpr) bool { + if len(call.Args) < 2 { + return false + } + + // Check if any argument is a variable (not a literal) + for i, arg := range call.Args { + if i == 0 { + // Skip format string + continue + } + // If argument is not a literal, it might be user input + if _, ok := arg.(*ast.BasicLit); !ok { + return true + } + } + + return false +} + +// containsStringVariable checks if an expression contains string variables. +func (s *SQLInjectionScanner) containsStringVariable(expr ast.Expr) bool { + hasVariable := false + + ast.Inspect(expr, func(n ast.Node) bool { + switch node := n.(type) { + case *ast.Ident: + // Check if this is a variable (not a constant) + if node.Obj != nil { + hasVariable = true + return false + } + case *ast.CallExpr: + // Function call results are considered dynamic + hasVariable = true + return false + } + return true + }) + + return hasVariable +} + +// isSQLStringConcat checks if a binary expression looks like SQL concatenation. +func (s *SQLInjectionScanner) isSQLStringConcat(expr *ast.BinaryExpr) bool { + // Check left operand + if s.isQueryString(expr.X) { + return true + } + // Check right operand + if s.isQueryString(expr.Y) { + return true + } + return false +} + +// isQueryString checks if an expression looks like a SQL query string. +func (s *SQLInjectionScanner) isQueryString(expr ast.Expr) bool { + if lit, ok := expr.(*ast.BasicLit); ok && lit.Kind == token.STRING { + value := strings.ToUpper(lit.Value) + return sqlPattern.MatchString(value) + } + return false +} + +// mightBeDynamicQuery checks if an identifier might be a dynamically built query. +func (s *SQLInjectionScanner) mightBeDynamicQuery(ident *ast.Ident) bool { + name := strings.ToLower(ident.Name) + return strings.Contains(name, "query") || + strings.Contains(name, "sql") || + strings.Contains(name, "stmt") +} + +// AnalyzeSQLInjection is a convenience function to run SQL injection scanning. +func AnalyzeSQLInjection(pass *analysis.Pass, file *ast.File) { + scanner := NewSQLInjectionScanner() + violations := scanner.ScanFile(pass, file) + + for _, v := range violations { + message := v.Message + if v.Suggestion != "" { + message += "\n Suggestion: " + v.Suggestion + } + if v.CodeFix != "" { + message += "\n Fix: " + v.CodeFix + } + if v.Severity != "" { + message = "[" + string(v.Severity) + "] " + message + } + + pass.Report(analysis.Diagnostic{ + Pos: v.Pos, + End: v.End, + Message: message, + }) + } +} + +// GetSQLInjectionViolations returns all SQL injection violations for external use. +func GetSQLInjectionViolations(pass *analysis.Pass, file *ast.File) []SQLInjectionViolation { + scanner := NewSQLInjectionScanner() + return scanner.ScanFile(pass, file) +} + +// ScanFileAST scans a file for SQL injection vulnerabilities without analysis.Pass. +// This is designed for use in LSP server where we don't have a full analysis pass. +func ScanFileAST(fset *token.FileSet, file *ast.File) []SQLInjectionViolation { + scanner := NewSQLInjectionScanner() + return scanner.ScanFileNoPass(fset, file) +} + +// ScanFileNoPass scans a file for SQL injection vulnerabilities without analysis.Pass. +// This is a method version for testing purposes. +func (s *SQLInjectionScanner) ScanFileNoPass(fset *token.FileSet, file *ast.File) []SQLInjectionViolation { + var violations []SQLInjectionViolation + + ast.Inspect(file, func(n ast.Node) bool { + switch node := n.(type) { + case *ast.CallExpr: + if v := s.checkCallExpr(node); v != nil { + violations = append(violations, *v) + } + case *ast.BinaryExpr: + if v := s.checkBinaryExpr(node); v != nil { + violations = append(violations, *v) + } + } + return true + }) + + return violations +} diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/pkg/config/config.go b/tools/vendor/github.com/MirrexOne/unqueryvet/pkg/config/config.go index 1f201b526..b24fa6ff1 100644 --- a/tools/vendor/github.com/MirrexOne/unqueryvet/pkg/config/config.go +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/pkg/config/config.go @@ -1,6 +1,38 @@ // Package config provides configuration structures for Unqueryvet analyzer. package config +// CustomRule represents a user-defined DSL rule for SQL analysis. +type CustomRule struct { + // ID is a unique identifier for the rule. + ID string `mapstructure:"id" json:"id" yaml:"id"` + + // Pattern is the SQL or code pattern to match. + // Supports metavariables like $TABLE, $VAR, etc. + Pattern string `mapstructure:"pattern" json:"pattern" yaml:"pattern"` + + // Patterns allows multiple patterns for a single rule. + Patterns []string `mapstructure:"patterns" json:"patterns" yaml:"patterns,omitempty"` + + // When is an optional condition expression (evaluated with expr-lang). + // Available variables: file, package, function, query, table, in_loop, etc. + When string `mapstructure:"when" json:"when" yaml:"when,omitempty"` + + // Message is the diagnostic message shown when the rule triggers. + Message string `mapstructure:"message" json:"message" yaml:"message,omitempty"` + + // Severity is the severity level (error, warning, info, ignore). + Severity string `mapstructure:"severity" json:"severity" yaml:"severity,omitempty"` + + // Action determines what to do when the pattern matches (report, allow, ignore). + Action string `mapstructure:"action" json:"action" yaml:"action,omitempty"` + + // Fix is an optional suggested fix message. + Fix string `mapstructure:"fix" json:"fix" yaml:"fix,omitempty"` +} + +// RuleSeverity maps built-in rule IDs to their severity levels. +type RuleSeverity map[string]string + // UnqueryvetSettings holds the configuration for the Unqueryvet analyzer. type UnqueryvetSettings struct { // CheckSQLBuilders enables checking SQL builders like Squirrel for SELECT * usage @@ -38,6 +70,26 @@ type UnqueryvetSettings struct { // SQLBuilders defines which SQL builder libraries to check SQLBuilders SQLBuildersConfig `mapstructure:"sql-builders" json:"sql-builders" yaml:"sql-builders"` + + // Rules is a map of built-in rule IDs to their severity (error, warning, info, ignore). + // Example: {"select-star": "error", "n1-queries": "warning"} + Rules RuleSeverity `mapstructure:"rules" json:"rules" yaml:"rules,omitempty"` + + // CustomRules is a list of user-defined DSL rules. + CustomRules []CustomRule `mapstructure:"custom-rules" json:"custom-rules" yaml:"custom-rules,omitempty"` + + // Allow is a list of SQL patterns to allow (whitelist). + // These patterns will not trigger any warnings. + Allow []string `mapstructure:"allow" json:"allow" yaml:"allow,omitempty"` + + // Ignore is a list of file patterns to ignore (in addition to IgnoredFiles). + Ignore []string `mapstructure:"ignore" json:"ignore" yaml:"ignore,omitempty"` + + // N1DetectionEnabled global flag for N+1 detection + N1DetectionEnabled bool `mapstructure:"check-n1-queries" json:"check-n1-queries" yaml:"check-n1-queries,omitempty"` + + // SQLInjectionDetectionEnabled global flag for SQL injection detection + SQLInjectionDetectionEnabled bool `mapstructure:"check-sql-injection" json:"check-sql-injection" yaml:"check-sql-injection,omitempty"` } // SQLBuildersConfig defines which SQL builder libraries to analyze. @@ -65,6 +117,18 @@ type SQLBuildersConfig struct { // Jet enables checking github.com/go-jet/jet Jet bool `mapstructure:"jet" json:"jet" yaml:"jet"` + + // Sqlc enables checking github.com/sqlc-dev/sqlc generated code + Sqlc bool `mapstructure:"sqlc" json:"sqlc" yaml:"sqlc"` + + // Goqu enables checking github.com/doug-martin/goqu + Goqu bool `mapstructure:"goqu" json:"goqu" yaml:"goqu"` + + // Rel enables checking github.com/go-rel/rel + Rel bool `mapstructure:"rel" json:"rel" yaml:"rel"` + + // Reform enables checking gopkg.in/reform.v1 + Reform bool `mapstructure:"reform" json:"reform" yaml:"reform"` } // DefaultSQLBuildersConfig returns the default SQL builders configuration with all checkers enabled. @@ -78,6 +142,10 @@ func DefaultSQLBuildersConfig() SQLBuildersConfig { Bun: true, SQLBoiler: true, Jet: true, + Sqlc: true, + Goqu: true, + Rel: true, + Reform: true, } } @@ -103,5 +171,10 @@ func DefaultSettings() UnqueryvetSettings { IgnoredFunctions: []string{}, IgnoredFiles: []string{}, SQLBuilders: DefaultSQLBuildersConfig(), + Rules: RuleSeverity{ + "select-star": "warning", + "n1-queries": "warning", + "sql-injection": "error", + }, } } diff --git a/tools/vendor/github.com/MirrexOne/unqueryvet/schema.json b/tools/vendor/github.com/MirrexOne/unqueryvet/schema.json new file mode 100644 index 000000000..4bb9ced86 --- /dev/null +++ b/tools/vendor/github.com/MirrexOne/unqueryvet/schema.json @@ -0,0 +1,266 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://raw.githubusercontent.com/MirrexOne/unqueryvet/main/schema.json", + "title": "unqueryvet configuration", + "description": "Configuration schema for unqueryvet - a Go static analysis tool for SQL queries", + "type": "object", + "additionalProperties": false, + "properties": { + "rules": { + "type": "object", + "description": "Built-in rules severity configuration", + "additionalProperties": false, + "properties": { + "select-star": { + "$ref": "#/definitions/severity", + "description": "Severity for SELECT * detection" + }, + "n1-queries": { + "$ref": "#/definitions/severity", + "description": "Severity for N+1 query detection" + }, + "sql-injection": { + "$ref": "#/definitions/severity", + "description": "Severity for SQL injection detection" + } + } + }, + "ignore": { + "type": "array", + "description": "File patterns to ignore (glob syntax)", + "items": { + "type": "string" + }, + "examples": [["*_test.go", "testdata/**", "vendor/**"]] + }, + "allow": { + "type": "array", + "description": "SQL patterns to whitelist (won't trigger warnings)", + "items": { + "type": "string" + }, + "examples": [["COUNT(*)", "information_schema.*"]] + }, + "severity": { + "$ref": "#/definitions/severityLevel", + "description": "Default diagnostic severity: 'error' or 'warning'", + "default": "warning" + }, + "check-sql-builders": { + "type": "boolean", + "description": "Enable SQL builder library checking", + "default": true + }, + "check-aliased-wildcard": { + "type": "boolean", + "description": "Enable aliased wildcard detection (e.g., SELECT t.*)", + "default": true + }, + "check-string-concat": { + "type": "boolean", + "description": "Enable string concatenation analysis", + "default": true + }, + "check-format-strings": { + "type": "boolean", + "description": "Enable format string analysis (e.g., fmt.Sprintf)", + "default": true + }, + "check-string-builder": { + "type": "boolean", + "description": "Enable strings.Builder analysis", + "default": true + }, + "check-subqueries": { + "type": "boolean", + "description": "Enable SELECT * detection in subqueries", + "default": true + }, + "sql-builders": { + "type": "object", + "description": "SQL builder libraries to check", + "additionalProperties": false, + "properties": { + "squirrel": { + "type": "boolean", + "description": "Check github.com/Masterminds/squirrel", + "default": true + }, + "gorm": { + "type": "boolean", + "description": "Check gorm.io/gorm", + "default": true + }, + "sqlx": { + "type": "boolean", + "description": "Check github.com/jmoiron/sqlx", + "default": true + }, + "ent": { + "type": "boolean", + "description": "Check entgo.io/ent", + "default": true + }, + "pgx": { + "type": "boolean", + "description": "Check github.com/jackc/pgx", + "default": true + }, + "bun": { + "type": "boolean", + "description": "Check github.com/uptrace/bun", + "default": true + }, + "sqlboiler": { + "type": "boolean", + "description": "Check github.com/volatiletech/sqlboiler", + "default": true + }, + "jet": { + "type": "boolean", + "description": "Check github.com/go-jet/jet", + "default": true + }, + "sqlc": { + "type": "boolean", + "description": "Check sqlc generated code", + "default": true + }, + "goqu": { + "type": "boolean", + "description": "Check github.com/doug-martin/goqu", + "default": true + }, + "rel": { + "type": "boolean", + "description": "Check github.com/go-rel/rel", + "default": true + }, + "reform": { + "type": "boolean", + "description": "Check gopkg.in/reform.v1", + "default": true + } + } + }, + "ignored-files": { + "type": "array", + "description": "Legacy: File patterns to ignore (use 'ignore' instead)", + "items": { + "type": "string" + }, + "deprecated": true + }, + "ignored-functions": { + "type": "array", + "description": "Function patterns to ignore (regex)", + "items": { + "type": "string" + }, + "examples": [["debug\\..*", "test.*"]] + }, + "allowed-patterns": { + "type": "array", + "description": "Legacy: Regex patterns to allow (use 'allow' instead)", + "items": { + "type": "string" + }, + "deprecated": true + }, + "custom-rules": { + "type": "array", + "description": "Custom analysis rules using DSL", + "items": { + "$ref": "#/definitions/customRule" + } + }, + "output": { + "type": "object", + "description": "Output configuration options", + "additionalProperties": false, + "properties": { + "format": { + "type": "string", + "enum": ["text", "json", "sarif"], + "description": "Output format", + "default": "text" + }, + "color": { + "type": "string", + "enum": ["auto", "always", "never"], + "description": "Color output mode", + "default": "auto" + }, + "verbose": { + "type": "boolean", + "description": "Enable verbose output", + "default": false + }, + "quiet": { + "type": "boolean", + "description": "Quiet mode (only errors)", + "default": false + } + } + } + }, + "definitions": { + "severity": { + "type": "string", + "enum": ["error", "warning", "info", "ignore"], + "description": "Severity level for a rule" + }, + "severityLevel": { + "type": "string", + "enum": ["error", "warning"], + "description": "Default severity level" + }, + "customRule": { + "type": "object", + "description": "Custom analysis rule definition", + "required": ["id"], + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the rule", + "pattern": "^[a-z][a-z0-9-]*$" + }, + "pattern": { + "type": "string", + "description": "SQL/code pattern to match (supports metavariables: $TABLE, $VAR, $QUERY, $COLS, $DB, $EXPR)" + }, + "patterns": { + "type": "array", + "description": "Multiple patterns (any match triggers the rule)", + "items": { + "type": "string" + } + }, + "when": { + "type": "string", + "description": "Condition expression using expr-lang syntax. Available variables: file, package, function, query, query_type, table, tables, columns, has_join, has_where, in_loop, loop_depth, builder" + }, + "message": { + "type": "string", + "description": "Diagnostic message to display when rule matches" + }, + "severity": { + "$ref": "#/definitions/severity", + "description": "Severity level for this rule" + }, + "action": { + "type": "string", + "enum": ["report", "allow", "ignore"], + "description": "Action to take when rule matches", + "default": "report" + }, + "fix": { + "type": "string", + "description": "Suggested fix message" + } + }, + "oneOf": [{ "required": ["pattern"] }, { "required": ["patterns"] }] + } + } +} diff --git a/tools/vendor/github.com/alecthomas/chroma/v2/Dockerfile b/tools/vendor/github.com/alecthomas/chroma/v2/Dockerfile index bd55da067..c86b37932 100644 --- a/tools/vendor/github.com/alecthomas/chroma/v2/Dockerfile +++ b/tools/vendor/github.com/alecthomas/chroma/v2/Dockerfile @@ -7,7 +7,6 @@ FROM ubuntu:24.04 AS builder RUN apt-get update && apt-get install -y \ curl \ git \ - make \ ca-certificates \ && rm -rf /var/lib/apt/lists/* @@ -25,8 +24,8 @@ ENV CGO_ENABLED=0 ENV GOOS=linux ENV GOARCH=amd64 -# Build the application using make -RUN make build/chromad +# Build the application using just +RUN just chromad # Runtime stage FROM alpine:3.23 AS runtime diff --git a/tools/vendor/github.com/alecthomas/chroma/v2/Justfile b/tools/vendor/github.com/alecthomas/chroma/v2/Justfile new file mode 100644 index 000000000..24e3816f1 --- /dev/null +++ b/tools/vendor/github.com/alecthomas/chroma/v2/Justfile @@ -0,0 +1,55 @@ +set positional-arguments := true +set shell := ["bash", "-c"] + +version := `git describe --tags --dirty --always` +export GOOS := env("GOOS", "linux") +export GOARCH := env("GOARCH", "amd64") + +_help: + @just -l + +# Generate README.md from lexer definitions +readme: + #!/usr/bin/env bash + GOOS= GOARCH= ./table.py + +# Generate tokentype_string.go +tokentype-string: + go generate + +# Format JavaScript files +format-js: + biome format --write cmd/chromad/static/index.js cmd/chromad/static/chroma.js + +# Build chromad binary +chromad: wasm-exec chroma-wasm + #!/usr/bin/env bash + rm -rf build + mk cmd/chromad/static/index.min.js : cmd/chromad/static/{index,chroma}.js -- \ + esbuild --platform=browser --format=esm --bundle cmd/chromad/static/index.js --minify --external:./wasm_exec.js --outfile=cmd/chromad/static/index.min.js + mk cmd/chromad/static/index.min.css : cmd/chromad/static/index.css -- \ + esbuild --bundle cmd/chromad/static/index.css --minify --outfile=cmd/chromad/static/index.min.css + cd cmd/chromad && CGOENABLED=0 go build -ldflags="-X 'main.version={{ version }}'" -o ../../build/chromad . + +# Copy wasm_exec.js from TinyGo +wasm-exec: + #!/usr/bin/env bash + tinygoroot=$(tinygo env TINYGOROOT) + mk cmd/chromad/static/wasm_exec.js : "$tinygoroot/targets/wasm_exec.js" -- \ + install -m644 "$tinygoroot/targets/wasm_exec.js" cmd/chromad/static/wasm_exec.js + +# Build WASM binary +chroma-wasm: + #!/usr/bin/env bash + if type tinygo > /dev/null 2>&1; then + mk cmd/chromad/static/chroma.wasm : cmd/libchromawasm/main.go -- \ + tinygo build -no-debug -target wasm -o cmd/chromad/static/chroma.wasm cmd/libchromawasm/main.go + else + mk cmd/chromad/static/chroma.wasm : cmd/libchromawasm/main.go -- \ + GOOS=js GOARCH=wasm go build -o cmd/chromad/static/chroma.wasm cmd/libchromawasm/main.go + fi + +# Upload chromad to server +upload: chromad + scp build/chromad root@swapoff.org: + ssh root@swapoff.org 'install -m755 ./chromad /srv/http/swapoff.org/bin && service chromad restart' diff --git a/tools/vendor/github.com/alecthomas/chroma/v2/Makefile b/tools/vendor/github.com/alecthomas/chroma/v2/Makefile deleted file mode 100644 index ca89f7cb0..000000000 --- a/tools/vendor/github.com/alecthomas/chroma/v2/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -.PHONY: chromad upload all - -VERSION ?= $(shell git describe --tags --dirty --always) -export GOOS ?= linux -export GOARCH ?= amd64 - -all: README.md tokentype_string.go - -README.md: lexers/*.go lexers/embedded/*.xml - GOOS= GOARCH= ./table.py - -tokentype_string.go: types.go - go generate - -.PHONY: format-js -format-js: - biome format --write cmd/chromad/static/{index.js,chroma.js} - -.PHONY: chromad -chromad: build/chromad - -build/chromad: $(shell find cmd/chromad -name '*.go' -o -name '*.html' -o -name '*.css' -o -name '*.js') \ - cmd/chromad/static/wasm_exec.js \ - cmd/chromad/static/chroma.wasm - rm -rf build - esbuild --platform=node --bundle cmd/chromad/static/index.js --minify --outfile=cmd/chromad/static/index.min.js - esbuild --bundle cmd/chromad/static/index.css --minify --outfile=cmd/chromad/static/index.min.css - (export CGOENABLED=0 ; go build -C cmd/chromad -ldflags="-X 'main.version=$(VERSION)'" -o ../../build/chromad .) - -cmd/chromad/static/wasm_exec.js: $(shell tinygo env TINYGOROOT)/targets/wasm_exec.js - install -m644 $< $@ - -cmd/chromad/static/chroma.wasm: $(shell git ls-files | grep '\.go|\.xml') - if type tinygo > /dev/null; then \ - tinygo build -no-debug -target wasm -o $@ cmd/libchromawasm/main.go; \ - else \ - GOOS=js GOARCH=wasm go build -o $@ cmd/libchromawasm/main.go; \ - fi - -upload: build/chromad - scp build/chromad root@swapoff.org: && \ - ssh root@swapoff.org 'install -m755 ./chromad /srv/http/swapoff.org/bin && service chromad restart' diff --git a/tools/vendor/github.com/alecthomas/chroma/v2/README.md b/tools/vendor/github.com/alecthomas/chroma/v2/README.md index 0cfa07f41..4aeb54d97 100644 --- a/tools/vendor/github.com/alecthomas/chroma/v2/README.md +++ b/tools/vendor/github.com/alecthomas/chroma/v2/README.md @@ -48,7 +48,7 @@ translators for Pygments lexers and styles. | J | J, Janet, Java, JavaScript, JSON, JSONata, Jsonnet, Julia, Jungle | K | Kakoune, Kotlin | L | Lean4, Lighttpd configuration file, LLVM, lox, Lua -| M | Makefile, Mako, markdown, Mason, Materialize SQL dialect, Mathematica, Matlab, MCFunction, Meson, Metal, MiniZinc, MLIR, Modelica, Modula-2, Mojo, MonkeyC, MoonScript, MorrowindScript, Myghty, MySQL +| M | Makefile, Mako, markdown, Markless, Mason, Materialize SQL dialect, Mathematica, Matlab, MCFunction, Meson, Metal, MiniZinc, MLIR, Modelica, Modula-2, Mojo, MonkeyC, MoonScript, MorrowindScript, Myghty, MySQL | N | NASM, Natural, NDISASM, Newspeak, Nginx configuration file, Nim, Nix, NSIS, Nu | O | Objective-C, ObjectPascal, OCaml, Octave, Odin, OnesEnterprise, OpenEdge ABL, OpenSCAD, Org Mode | P | PacmanConf, Perl, PHP, PHTML, Pig, PkgConfig, PL/pgSQL, plaintext, Plutus Core, Pony, PostgreSQL SQL dialect, PostScript, POVRay, PowerQuery, PowerShell, Prolog, Promela, PromQL, properties, Protocol Buffer, Protocol Buffer Text Format, PRQL, PSL, Puppet, Python, Python 2 diff --git a/tools/vendor/github.com/alecthomas/chroma/v2/formatters/html/html.go b/tools/vendor/github.com/alecthomas/chroma/v2/formatters/html/html.go index c1c8875b2..1aaafd0f4 100644 --- a/tools/vendor/github.com/alecthomas/chroma/v2/formatters/html/html.go +++ b/tools/vendor/github.com/alecthomas/chroma/v2/formatters/html/html.go @@ -528,6 +528,7 @@ func (f *Formatter) styleToCSS(style *chroma.Style) map[chroma.TokenType]string } classes[chroma.Background] += `;` + f.tabWidthStyle() classes[chroma.PreWrapper] += classes[chroma.Background] + classes[chroma.PreWrapper] += ` -webkit-text-size-adjust: none;` // Make PreWrapper a grid to show highlight style with full width. if len(f.highlightRanges) > 0 && f.customCSS[chroma.PreWrapper] == `` { classes[chroma.PreWrapper] += `display: grid;` diff --git a/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/bash.xml b/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/bash.xml index d704a8ffa..11843edca 100644 --- a/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/bash.xml +++ b/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/bash.xml @@ -23,6 +23,7 @@ bash_* zshrc .zshrc + APKBUILD PKGBUILD application/x-sh application/x-shellscript @@ -217,4 +218,4 @@ - \ No newline at end of file + diff --git a/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/kdl.xml b/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/kdl.xml new file mode 100644 index 000000000..bc6ebfb80 --- /dev/null +++ b/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/kdl.xml @@ -0,0 +1,75 @@ + + + KDL + kdl + *.kdl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/microcad.xml b/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/microcad.xml new file mode 100644 index 000000000..6de71ef0a --- /dev/null +++ b/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/microcad.xml @@ -0,0 +1,139 @@ + + + microcad + µcad + *.µcad + *.ucad + *.mcad + text/microcad + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/moonbit.xml b/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/moonbit.xml new file mode 100644 index 000000000..846e724dc --- /dev/null +++ b/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/moonbit.xml @@ -0,0 +1,75 @@ + + + MoonBit + moonbit + mbt + *.mbt + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/zig.xml b/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/zig.xml index 6f17bcafc..5617f9141 100644 --- a/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/zig.xml +++ b/tools/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/zig.xml @@ -8,7 +8,13 @@ - + + + + + + + @@ -18,99 +24,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + - + + - + + - + + + - + + - + + - + + - + + - - - - + + - + + - - - - + + - + + - + + - + + - - + + + + - + + - - - - - + + + - - + + + - - + + + + - - - - + + - + + + + + + + + + + + + + + - + + + + + + + + + + + - \ No newline at end of file + diff --git a/tools/vendor/github.com/alecthomas/chroma/v2/lexers/markless.go b/tools/vendor/github.com/alecthomas/chroma/v2/lexers/markless.go new file mode 100644 index 000000000..508513d78 --- /dev/null +++ b/tools/vendor/github.com/alecthomas/chroma/v2/lexers/markless.go @@ -0,0 +1,168 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma/v2" // nolint +) + +// Markless lexer. +var Markless = Register(MustNewLexer( + &Config{ + Name: "Markless", + Aliases: []string{"mess"}, + Filenames: []string{"*.mess", "*.markless"}, + MimeTypes: []string{"text/x-markless"}, + }, + marklessRules, +)) + +func marklessRules() Rules { + return Rules{ + "root": { + Include("block"), + }, + // Block directives + "block": { + Include("header"), + Include("ordered-list"), + Include("unordered-list"), + Include("code-block"), + Include("blockquote"), + Include("blockquote-header"), + Include("align"), + Include("comment"), + Include("instruction"), + Include("embed"), + Include("footnote"), + Include("horizontal-rule"), + Include("paragraph"), + }, + "header": { + {`(# )(.*)$`, ByGroups(Keyword, GenericHeading), Push("inline")}, + {`(##+)(.*)$`, ByGroups(Keyword, GenericSubheading), Push("inline")}, + }, + "ordered-list": { + {`([0-9]+\.)`, Keyword, nil}, + }, + "unordered-list": { + {`(- )`, Keyword, nil}, + }, + "code-block": { + {`(::+)( *)(\w*)([^\n]*)(\n)([\w\W]*?)(^\1$)`, UsingByGroup(3, 6, Keyword, TextWhitespace, NameFunction, String, TextWhitespace, Text, Keyword), nil}, + }, + "blockquote": { + {`(\| )(.*)$`, ByGroups(Keyword, GenericInserted), nil}, + }, + "blockquote-header": { + {`(~ )([^|\n]+)(\| )(.*?\n)`, ByGroups(Keyword, NameEntity, Keyword, GenericInserted), Push("inline-blockquote")}, + {`(~ )(.*)$`, ByGroups(Keyword, NameEntity), nil}, + }, + "inline-blockquote": { + {`^( +)(\| )(.*$)`, ByGroups(TextWhitespace, Keyword, GenericInserted), nil}, + Default(Pop(1)), + }, + "align": { + {`(\|\|)|(\|<)|(\|>)|(><)`, Keyword, nil}, + }, + "comment": { + {`(;[; ]).*?$`, CommentSingle, nil}, + }, + "instruction": { + {`(! )([^ ]+)(.+?)$`, ByGroups(Keyword, NameFunction, NameVariable), nil}, + }, + "embed": { + {`(\[ )([^ ]+)( )([^,]+)`, ByGroups(Keyword, NameFunction, TextWhitespace, String), Push("embed-options")}, + }, + "embed-options": { + {`\\.`, Text, nil}, + {`,`, Punctuation, nil}, + {`\]?$`, Keyword, Pop(1)}, + // Generic key or key/value pair + {`( *)([^, \]]+)([^,\]]+)?`, ByGroups(TextWhitespace, NameFunction, String), nil}, + {`.`, Text, nil}, + }, + "footnote": { + {`(\[)([0-9]+)(\])`, ByGroups(Keyword, NameVariable, Keyword), Push("inline")}, + }, + "horizontal-rule": { + {`(==+)$`, LiteralOther, nil}, + }, + "paragraph": { + {` *`, TextWhitespace, Push("inline")}, + }, + // Inline directives + "inline": { + Include("escapes"), + Include("dashes"), + Include("newline"), + Include("italic"), + Include("underline"), + Include("bold"), + Include("strikethrough"), + Include("code"), + Include("compound"), + Include("footnote-reference"), + Include("subtext"), + Include("subtext"), + Include("url"), + {`.`, Text, nil}, + {`\n`, TextWhitespace, Pop(1)}, + }, + "escapes": { + {`\\.`, Text, nil}, + }, + "dashes": { + {`-{2,3}`, TextPunctuation, nil}, + }, + "newline": { + {`-/-`, TextWhitespace, nil}, + }, + "italic": { + {`(//)(.*?)(\1)`, ByGroups(Keyword, GenericEmph, Keyword), nil}, + }, + "underline": { + {`(__)(.*?)(\1)`, ByGroups(Keyword, GenericUnderline, Keyword), nil}, + }, + "bold": { + {`(\*\*)(.*?)(\1)`, ByGroups(Keyword, GenericStrong, Keyword), nil}, + }, + "strikethrough": { + {`(<-)(.*?)(->)`, ByGroups(Keyword, GenericDeleted, Keyword), nil}, + }, + "code": { + {"(``+)(.*?)(\\1)", ByGroups(Keyword, LiteralStringBacktick, Keyword), nil}, + }, + "compound": { + {`(''+)(.*?)(''\()`, ByGroups(Keyword, UsingSelf("inline"), Keyword), Push("compound-options")}, + }, + "compound-options": { + {`\\.`, Text, nil}, + {`,`, Punctuation, nil}, + {`\)`, Keyword, Pop(1)}, + // Hex Color + {` *#[0-9A-Fa-f]{3,6} *`, LiteralNumberHex, nil}, + // Named Color + {` *(indian-red|light-coral|salmon|dark-salmon|light-salmon|crimson|red|firebrick|dark-red|pink|light-pink|hot-pink|deep-pink|medium-violet-red|pale-violet-red|coral|tomato|orange-red|dark-orange|orange|gold|yellow|light-yellow|lemon-chiffon|light-goldenrod-yellow|papayawhip|moccasin|peachpuff|pale-goldenrod|khaki|dark-khaki|lavender|thistle|plum|violet|orchid|fuchsia|magenta|medium-orchid|medium-purple|rebecca-purple|blue-violet|dark-violet|dark-orchid|dark-magenta|purple|indigo|slate-blue|dark-slate-blue|medium-slate-blue|green-yellow|chartreuse|lawn-green|lime|lime-green|pale-green|light-green|medium-spring-green|spring-green|medium-sea-green|sea-green|forest-green|green|dark-green|yellow-green|olive-drab|olive|dark-olive-green|medium-aquamarine|dark-sea-green|light-sea-green|dark-cyan|teal|aqua|cyan|light-cyan|pale-turquoise|aquamarine|turquoise|medium-turquoise|dark-turquoise|cadet-blue|steel-blue|light-steel-blue|powder-blue|light-blue|sky-blue|light-sky-blue|deep-sky-blue|dodger-blue|cornflower-blue|royal-blue|blue|medium-blue|dark-blue|navy|midnight-blue|cornsilk|blanched-almond|bisque|navajo-white|wheat|burlywood|tan|rosy-brown|sandy-brown|goldenrod|dark-goldenrod|peru|chocolate|saddle-brown|sienna|brown|maroon|white|snow|honeydew|mintcream|azure|alice-blue|ghost-white|white-smoke|seashell|beige|oldlace|floral-white|ivory|antique-white|linen|lavenderblush|mistyrose|gainsboro|light-gray|silver|dark-gray|gray|dim-gray|light-slate-gray|slate-gray|dark-slate-gray) *`, LiteralOther, nil}, + // Named size + {` *(microscopic|tiny|small|normal|big|large|huge|gigantic) *`, NameTag, nil}, + // Options + {` *(bold|italic|underline|strikethrough|subtext|supertext|spoiler) *`, NameBuiltin, nil}, + // URL. Note the missing ) and , in the match. + {` *\w[-\w+.]*://[\w$\-_.+!*'(&/:;=?@z%#\\]+ *`, String, nil}, + // Generic key or key/value pair + {`( *)([^, )]+)( [^,)]+)?`, ByGroups(TextWhitespace, NameFunction, String), nil}, + {`.`, Text, nil}, + }, + "footnote-reference": { + {`(\[)([0-9]+)(\])`, ByGroups(Keyword, NameVariable, Keyword), nil}, + }, + "subtext": { + {`(v\()(.*?)(\))`, ByGroups(Keyword, UsingSelf("inline"), Keyword), nil}, + }, + "supertext": { + {`(\^\()(.*?)(\))`, ByGroups(Keyword, UsingSelf("inline"), Keyword), nil}, + }, + "url": { + {`\w[-\w+.]*://[\w\$\-_.+!*'()&,/:;=?@z%#\\]+`, String, nil}, + }, + } +} diff --git a/tools/vendor/github.com/alecthomas/chroma/v2/styles/aura-theme-dark-soft.xml b/tools/vendor/github.com/alecthomas/chroma/v2/styles/aura-theme-dark-soft.xml index 37f589f98..ee7f1257f 100644 --- a/tools/vendor/github.com/alecthomas/chroma/v2/styles/aura-theme-dark-soft.xml +++ b/tools/vendor/github.com/alecthomas/chroma/v2/styles/aura-theme-dark-soft.xml @@ -101,7 +101,7 @@ - + diff --git a/tools/vendor/github.com/alecthomas/chroma/v2/styles/aura-theme-dark.xml b/tools/vendor/github.com/alecthomas/chroma/v2/styles/aura-theme-dark.xml index fd1cd880c..85e8ec936 100644 --- a/tools/vendor/github.com/alecthomas/chroma/v2/styles/aura-theme-dark.xml +++ b/tools/vendor/github.com/alecthomas/chroma/v2/styles/aura-theme-dark.xml @@ -101,7 +101,7 @@ - + diff --git a/tools/vendor/github.com/go-viper/mapstructure/v2/.editorconfig b/tools/vendor/github.com/go-viper/mapstructure/v2/.editorconfig index faef0c91e..c37602a02 100644 --- a/tools/vendor/github.com/go-viper/mapstructure/v2/.editorconfig +++ b/tools/vendor/github.com/go-viper/mapstructure/v2/.editorconfig @@ -19,3 +19,6 @@ indent_size = 2 [.golangci.yaml] indent_size = 2 + +[devenv.yaml] +indent_size = 2 diff --git a/tools/vendor/github.com/go-viper/mapstructure/v2/.envrc b/tools/vendor/github.com/go-viper/mapstructure/v2/.envrc index 2e0f9f5f7..e2be8891c 100644 --- a/tools/vendor/github.com/go-viper/mapstructure/v2/.envrc +++ b/tools/vendor/github.com/go-viper/mapstructure/v2/.envrc @@ -1,4 +1,7 @@ -if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4=" -fi -use flake . --impure +#!/usr/bin/env bash + +export DIRENV_WARN_TIMEOUT=20s + +eval "$(devenv direnvrc)" + +use devenv diff --git a/tools/vendor/github.com/go-viper/mapstructure/v2/.gitignore b/tools/vendor/github.com/go-viper/mapstructure/v2/.gitignore index 470e7ca2b..71caea19f 100644 --- a/tools/vendor/github.com/go-viper/mapstructure/v2/.gitignore +++ b/tools/vendor/github.com/go-viper/mapstructure/v2/.gitignore @@ -1,6 +1,10 @@ -/.devenv/ -/.direnv/ -/.pre-commit-config.yaml /bin/ /build/ /var/ + +# Devenv +.devenv* +devenv.local.nix +devenv.local.yaml +.direnv +.pre-commit-config.yaml diff --git a/tools/vendor/github.com/go-viper/mapstructure/v2/devenv.lock b/tools/vendor/github.com/go-viper/mapstructure/v2/devenv.lock new file mode 100644 index 000000000..72c2c9b4d --- /dev/null +++ b/tools/vendor/github.com/go-viper/mapstructure/v2/devenv.lock @@ -0,0 +1,103 @@ +{ + "nodes": { + "devenv": { + "locked": { + "dir": "src/modules", + "lastModified": 1765288076, + "owner": "cachix", + "repo": "devenv", + "rev": "93c055af1e8fcac49251f1b2e1c57f78620ad351", + "type": "github" + }, + "original": { + "dir": "src/modules", + "owner": "cachix", + "repo": "devenv", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1765121682, + "owner": "edolstra", + "repo": "flake-compat", + "rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1765016596, + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "548fc44fca28a5e81c5d6b846e555e6b9c2a5a3c", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1762808025, + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1764580874, + "owner": "cachix", + "repo": "devenv-nixpkgs", + "rev": "dcf61356c3ab25f1362b4a4428a6d871e84f1d1d", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "rolling", + "repo": "devenv-nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "devenv": "devenv", + "git-hooks": "git-hooks", + "nixpkgs": "nixpkgs", + "pre-commit-hooks": [ + "git-hooks" + ] + } + } + }, + "root": "root", + "version": 7 +} diff --git a/tools/vendor/github.com/go-viper/mapstructure/v2/devenv.nix b/tools/vendor/github.com/go-viper/mapstructure/v2/devenv.nix new file mode 100644 index 000000000..b31ab7a1f --- /dev/null +++ b/tools/vendor/github.com/go-viper/mapstructure/v2/devenv.nix @@ -0,0 +1,14 @@ +{ + pkgs, + ... +}: + +{ + languages = { + go.enable = true; + }; + + packages = with pkgs; [ + golangci-lint + ]; +} diff --git a/tools/vendor/github.com/go-viper/mapstructure/v2/devenv.yaml b/tools/vendor/github.com/go-viper/mapstructure/v2/devenv.yaml new file mode 100644 index 000000000..68616a49c --- /dev/null +++ b/tools/vendor/github.com/go-viper/mapstructure/v2/devenv.yaml @@ -0,0 +1,4 @@ +# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json +inputs: + nixpkgs: + url: github:cachix/devenv-nixpkgs/rolling diff --git a/tools/vendor/github.com/go-viper/mapstructure/v2/flake.lock b/tools/vendor/github.com/go-viper/mapstructure/v2/flake.lock deleted file mode 100644 index 5e67bdd6b..000000000 --- a/tools/vendor/github.com/go-viper/mapstructure/v2/flake.lock +++ /dev/null @@ -1,294 +0,0 @@ -{ - "nodes": { - "cachix": { - "inputs": { - "devenv": [ - "devenv" - ], - "flake-compat": [ - "devenv" - ], - "git-hooks": [ - "devenv" - ], - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1742042642, - "narHash": "sha256-D0gP8srrX0qj+wNYNPdtVJsQuFzIng3q43thnHXQ/es=", - "owner": "cachix", - "repo": "cachix", - "rev": "a624d3eaf4b1d225f918de8543ed739f2f574203", - "type": "github" - }, - "original": { - "owner": "cachix", - "ref": "latest", - "repo": "cachix", - "type": "github" - } - }, - "devenv": { - "inputs": { - "cachix": "cachix", - "flake-compat": "flake-compat", - "git-hooks": "git-hooks", - "nix": "nix", - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1744876578, - "narHash": "sha256-8MTBj2REB8t29sIBLpxbR0+AEGJ7f+RkzZPAGsFd40c=", - "owner": "cachix", - "repo": "devenv", - "rev": "7ff7c351bba20d0615be25ecdcbcf79b57b85fe1", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "devenv", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "devenv", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1712014858, - "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "devenv" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "devenv", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "devenv", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "libgit2": { - "flake": false, - "locked": { - "lastModified": 1697646580, - "narHash": "sha256-oX4Z3S9WtJlwvj0uH9HlYcWv+x1hqp8mhXl7HsLu2f0=", - "owner": "libgit2", - "repo": "libgit2", - "rev": "45fd9ed7ae1a9b74b957ef4f337bc3c8b3df01b5", - "type": "github" - }, - "original": { - "owner": "libgit2", - "repo": "libgit2", - "type": "github" - } - }, - "nix": { - "inputs": { - "flake-compat": [ - "devenv" - ], - "flake-parts": "flake-parts", - "libgit2": "libgit2", - "nixpkgs": "nixpkgs_2", - "nixpkgs-23-11": [ - "devenv" - ], - "nixpkgs-regression": [ - "devenv" - ], - "pre-commit-hooks": [ - "devenv" - ] - }, - "locked": { - "lastModified": 1741798497, - "narHash": "sha256-E3j+3MoY8Y96mG1dUIiLFm2tZmNbRvSiyN7CrSKuAVg=", - "owner": "domenkozar", - "repo": "nix", - "rev": "f3f44b2baaf6c4c6e179de8cbb1cc6db031083cd", - "type": "github" - }, - "original": { - "owner": "domenkozar", - "ref": "devenv-2.24", - "repo": "nix", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1733212471, - "narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "55d15ad12a74eb7d4646254e13638ad0c4128776", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1743296961, - "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1717432640, - "narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "88269ab3044128b7c2f4c7d68448b2fb50456870", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1733477122, - "narHash": "sha256-qamMCz5mNpQmgBwc8SB5tVMlD5sbwVIToVZtSxMph9s=", - "owner": "cachix", - "repo": "devenv-nixpkgs", - "rev": "7bd9e84d0452f6d2e63b6e6da29fe73fac951857", - "type": "github" - }, - "original": { - "owner": "cachix", - "ref": "rolling", - "repo": "devenv-nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1744536153, - "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "devenv": "devenv", - "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_4" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/tools/vendor/github.com/go-viper/mapstructure/v2/flake.nix b/tools/vendor/github.com/go-viper/mapstructure/v2/flake.nix deleted file mode 100644 index 3b116f426..000000000 --- a/tools/vendor/github.com/go-viper/mapstructure/v2/flake.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - flake-parts.url = "github:hercules-ci/flake-parts"; - devenv.url = "github:cachix/devenv"; - }; - - outputs = - inputs@{ flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - imports = [ - inputs.devenv.flakeModule - ]; - - systems = [ - "x86_64-linux" - "x86_64-darwin" - "aarch64-darwin" - ]; - - perSystem = - { pkgs, ... }: - rec { - devenv.shells = { - default = { - languages = { - go.enable = true; - }; - - pre-commit.hooks = { - nixpkgs-fmt.enable = true; - }; - - packages = with pkgs; [ - golangci-lint - ]; - - # https://github.com/cachix/devenv/issues/528#issuecomment-1556108767 - containers = pkgs.lib.mkForce { }; - }; - - ci = devenv.shells.default; - }; - }; - }; -} diff --git a/tools/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go b/tools/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go index 7c35bce02..9087fd96c 100644 --- a/tools/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go +++ b/tools/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go @@ -173,6 +173,25 @@ // Public: "I made it through!" // } // +// # Custom Decoding with Unmarshaler +// +// Types can implement the Unmarshaler interface to control their own decoding. The interface +// behaves similarly to how UnmarshalJSON does in the standard library. It can be used as an +// alternative or companion to a DecodeHook. +// +// type TrimmedString string +// +// func (t *TrimmedString) UnmarshalMapstructure(input any) error { +// str, ok := input.(string) +// if !ok { +// return fmt.Errorf("expected string, got %T", input) +// } +// *t = TrimmedString(strings.TrimSpace(str)) +// return nil +// } +// +// See the Unmarshaler interface documentation for more details. +// // # Other Configuration // // mapstructure is highly configurable. See the DecoderConfig struct @@ -218,6 +237,17 @@ type DecodeHookFuncKind func(reflect.Kind, reflect.Kind, any) (any, error) // values. type DecodeHookFuncValue func(from reflect.Value, to reflect.Value) (any, error) +// Unmarshaler is the interface implemented by types that can unmarshal +// themselves. UnmarshalMapstructure receives the input data (potentially +// transformed by DecodeHook) and should populate the receiver with the +// decoded values. +// +// The Unmarshaler interface takes precedence over the default decoding +// logic for any type (structs, slices, maps, primitives, etc.). +type Unmarshaler interface { + UnmarshalMapstructure(any) error +} + // DecoderConfig is the configuration that is used to create a new decoder // and allows customization of various aspects of decoding. type DecoderConfig struct { @@ -281,6 +311,13 @@ type DecoderConfig struct { // } Squash bool + // Deep will map structures in slices instead of copying them + // + // type Parent struct { + // Children []Child `mapstructure:",deep"` + // } + Deep bool + // Metadata is the struct that will contain extra metadata about // the decoding. If this is nil, then no metadata will be tracked. Metadata *Metadata @@ -290,9 +327,15 @@ type DecoderConfig struct { Result any // The tag name that mapstructure reads for field names. This - // defaults to "mapstructure" + // defaults to "mapstructure". Multiple tag names can be specified + // as a comma-separated list (e.g., "yaml,json"), and the first + // matching non-empty tag will be used. TagName string + // RootName specifies the name to use for the root element in error messages. For example: + // '' has unset fields: + RootName string + // The option of the value in the tag that indicates a field should // be squashed. This defaults to "squash". SquashTagOption string @@ -304,11 +347,34 @@ type DecoderConfig struct { // MatchName is the function used to match the map key to the struct // field name or tag. Defaults to `strings.EqualFold`. This can be used // to implement case-sensitive tag values, support snake casing, etc. + // + // MatchName is used as a fallback comparison when the direct key lookup fails. + // See also MapFieldName for transforming field names before lookup. MatchName func(mapKey, fieldName string) bool // DecodeNil, if set to true, will cause the DecodeHook (if present) to run // even if the input is nil. This can be used to provide default values. DecodeNil bool + + // MapFieldName is the function used to convert the struct field name to the map's key name. + // + // This is useful for automatically converting between naming conventions without + // explicitly tagging each field. For example, to convert Go's PascalCase field names + // to snake_case map keys: + // + // MapFieldName: func(s string) string { + // return strcase.ToSnake(s) + // } + // + // When decoding from a map to a struct, the transformed field name is used for + // the initial lookup. If not found, MatchName is used as a fallback comparison. + // Explicit struct tags always take precedence over MapFieldName. + MapFieldName func(string) string + + // DisableUnmarshaler, if set to true, disables the use of the Unmarshaler + // interface. Types implementing Unmarshaler will be decoded using the + // standard struct decoding logic instead. + DisableUnmarshaler bool } // A Decoder takes a raw interface value and turns it into structured @@ -445,6 +511,12 @@ func NewDecoder(config *DecoderConfig) (*Decoder, error) { config.MatchName = strings.EqualFold } + if config.MapFieldName == nil { + config.MapFieldName = func(s string) string { + return s + } + } + result := &Decoder{ config: config, } @@ -458,7 +530,7 @@ func NewDecoder(config *DecoderConfig) (*Decoder, error) { // Decode decodes the given raw interface to the target pointer specified // by the configuration. func (d *Decoder) Decode(input any) error { - err := d.decode("", input, reflect.ValueOf(d.config.Result).Elem()) + err := d.decode(d.config.RootName, input, reflect.ValueOf(d.config.Result).Elem()) // Retain some of the original behavior when multiple errors ocurr var joinedErr interface{ Unwrap() []error } @@ -540,36 +612,50 @@ func (d *Decoder) decode(name string, input any, outVal reflect.Value) error { var err error addMetaKey := true - switch outputKind { - case reflect.Bool: - err = d.decodeBool(name, input, outVal) - case reflect.Interface: - err = d.decodeBasic(name, input, outVal) - case reflect.String: - err = d.decodeString(name, input, outVal) - case reflect.Int: - err = d.decodeInt(name, input, outVal) - case reflect.Uint: - err = d.decodeUint(name, input, outVal) - case reflect.Float32: - err = d.decodeFloat(name, input, outVal) - case reflect.Complex64: - err = d.decodeComplex(name, input, outVal) - case reflect.Struct: - err = d.decodeStruct(name, input, outVal) - case reflect.Map: - err = d.decodeMap(name, input, outVal) - case reflect.Ptr: - addMetaKey, err = d.decodePtr(name, input, outVal) - case reflect.Slice: - err = d.decodeSlice(name, input, outVal) - case reflect.Array: - err = d.decodeArray(name, input, outVal) - case reflect.Func: - err = d.decodeFunc(name, input, outVal) - default: - // If we reached this point then we weren't able to decode it - return newDecodeError(name, fmt.Errorf("unsupported type: %s", outputKind)) + + // Check if the target implements Unmarshaler and use it if not disabled + unmarshaled := false + if !d.config.DisableUnmarshaler { + if unmarshaler, ok := getUnmarshaler(outVal); ok { + if err = unmarshaler.UnmarshalMapstructure(input); err != nil { + err = newDecodeError(name, err) + } + unmarshaled = true + } + } + + if !unmarshaled { + switch outputKind { + case reflect.Bool: + err = d.decodeBool(name, input, outVal) + case reflect.Interface: + err = d.decodeBasic(name, input, outVal) + case reflect.String: + err = d.decodeString(name, input, outVal) + case reflect.Int: + err = d.decodeInt(name, input, outVal) + case reflect.Uint: + err = d.decodeUint(name, input, outVal) + case reflect.Float32: + err = d.decodeFloat(name, input, outVal) + case reflect.Complex64: + err = d.decodeComplex(name, input, outVal) + case reflect.Struct: + err = d.decodeStruct(name, input, outVal) + case reflect.Map: + err = d.decodeMap(name, input, outVal) + case reflect.Ptr: + addMetaKey, err = d.decodePtr(name, input, outVal) + case reflect.Slice: + err = d.decodeSlice(name, input, outVal) + case reflect.Array: + err = d.decodeArray(name, input, outVal) + case reflect.Func: + err = d.decodeFunc(name, input, outVal) + default: + // If we reached this point then we weren't able to decode it + return newDecodeError(name, fmt.Errorf("unsupported type: %s", outputKind)) + } } // If we reached here, then we successfully decoded SOMETHING, so @@ -668,7 +754,7 @@ func (d *Decoder) decodeString(name string, data any, val reflect.Value) error { case reflect.Uint8: var uints []uint8 if dataKind == reflect.Array { - uints = make([]uint8, dataVal.Len(), dataVal.Len()) + uints = make([]uint8, dataVal.Len()) for i := range uints { uints[i] = dataVal.Index(i).Interface().(uint8) } @@ -1060,8 +1146,8 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re ) } - tagValue := f.Tag.Get(d.config.TagName) - keyName := f.Name + tagValue, _ := getTagValue(f, d.config.TagName) + keyName := d.config.MapFieldName(f.Name) if tagValue == "" && d.config.IgnoreUntaggedFields { continue @@ -1070,6 +1156,9 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re // If Squash is set in the config, we squash the field down. squash := d.config.Squash && v.Kind() == reflect.Struct && f.Anonymous + // If Deep is set in the config, set as default value. + deep := d.config.Deep + v = dereferencePtrToStructIfNeeded(v, d.config.TagName) // Determine the name of the key in the map @@ -1078,12 +1167,12 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re continue } // If "omitempty" is specified in the tag, it ignores empty values. - if strings.Index(tagValue[index+1:], "omitempty") != -1 && isEmptyValue(v) { + if strings.Contains(tagValue[index+1:], "omitempty") && isEmptyValue(v) { continue } // If "omitzero" is specified in the tag, it ignores zero values. - if strings.Index(tagValue[index+1:], "omitzero") != -1 && v.IsZero() { + if strings.Contains(tagValue[index+1:], "omitzero") && v.IsZero() { continue } @@ -1103,7 +1192,7 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re ) } } else { - if strings.Index(tagValue[index+1:], "remain") != -1 { + if strings.Contains(tagValue[index+1:], "remain") { if v.Kind() != reflect.Map { return newDecodeError( name+"."+f.Name, @@ -1118,6 +1207,9 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re continue } } + + deep = deep || strings.Contains(tagValue[index+1:], "deep") + if keyNameTagValue := tagValue[:index]; keyNameTagValue != "" { keyName = keyNameTagValue } @@ -1164,6 +1256,41 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re valMap.SetMapIndex(reflect.ValueOf(keyName), vMap) } + case reflect.Slice: + if deep { + var childType reflect.Type + switch v.Type().Elem().Kind() { + case reflect.Struct: + childType = reflect.TypeOf(map[string]any{}) + default: + childType = v.Type().Elem() + } + + sType := reflect.SliceOf(childType) + + addrVal := reflect.New(sType) + + vSlice := reflect.MakeSlice(sType, v.Len(), v.Cap()) + + if v.Len() > 0 { + reflect.Indirect(addrVal).Set(vSlice) + + err := d.decode(keyName, v.Interface(), reflect.Indirect(addrVal)) + if err != nil { + return err + } + } + + vSlice = reflect.Indirect(addrVal) + + valMap.SetMapIndex(reflect.ValueOf(keyName), vSlice) + + break + } + + // When deep mapping is not needed, fallthrough to normal copy + fallthrough + default: valMap.SetMapIndex(reflect.ValueOf(keyName), v) } @@ -1471,7 +1598,10 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e remain := false // We always parse the tags cause we're looking for other tags too - tagParts := strings.Split(fieldType.Tag.Get(d.config.TagName), ",") + tagParts := getTagParts(fieldType, d.config.TagName) + if len(tagParts) == 0 { + tagParts = []string{""} + } for _, tag := range tagParts[1:] { if tag == d.config.SquashTagOption { squash = true @@ -1492,6 +1622,18 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e if !fieldVal.IsNil() { structs = append(structs, fieldVal.Elem().Elem()) } + case reflect.Ptr: + if fieldVal.Type().Elem().Kind() == reflect.Struct { + if fieldVal.IsNil() { + fieldVal.Set(reflect.New(fieldVal.Type().Elem())) + } + structs = append(structs, fieldVal.Elem()) + } else { + errs = append(errs, newDecodeError( + name+"."+fieldType.Name, + fmt.Errorf("unsupported type for squashed pointer: %s", fieldVal.Type().Elem().Kind()), + )) + } default: errs = append(errs, newDecodeError( name+"."+fieldType.Name, @@ -1516,13 +1658,15 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e field, fieldValue := f.field, f.val fieldName := field.Name - tagValue := field.Tag.Get(d.config.TagName) + tagValue, _ := getTagValue(field, d.config.TagName) if tagValue == "" && d.config.IgnoreUntaggedFields { continue } tagValue = strings.SplitN(tagValue, ",", 2)[0] if tagValue != "" { fieldName = tagValue + } else { + fieldName = d.config.MapFieldName(fieldName) } rawMapKey := reflect.ValueOf(fieldName) @@ -1605,8 +1749,14 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e } sort.Strings(keys) + // Improve error message when name is empty by showing the target struct type + // in the case where it is empty for embedded structs. + errorName := name + if errorName == "" { + errorName = val.Type().String() + } errs = append(errs, newDecodeError( - name, + errorName, fmt.Errorf("has invalid keys: %s", strings.Join(keys, ", ")), )) } @@ -1692,7 +1842,7 @@ func isStructTypeConvertibleToMap(typ reflect.Type, checkMapstructureTags bool, if f.PkgPath == "" && !checkMapstructureTags { // check for unexported fields return true } - if checkMapstructureTags && f.Tag.Get(tagName) != "" { // check for mapstructure tags inside + if checkMapstructureTags && hasAnyTag(f, tagName) { // check for mapstructure tags inside return true } } @@ -1700,13 +1850,99 @@ func isStructTypeConvertibleToMap(typ reflect.Type, checkMapstructureTags bool, } func dereferencePtrToStructIfNeeded(v reflect.Value, tagName string) reflect.Value { - if v.Kind() != reflect.Ptr || v.Elem().Kind() != reflect.Struct { + if v.Kind() != reflect.Ptr { + return v + } + + switch v.Elem().Kind() { + case reflect.Slice: + return v.Elem() + + case reflect.Struct: + deref := v.Elem() + derefT := deref.Type() + if isStructTypeConvertibleToMap(derefT, true, tagName) { + return deref + } + return v + + default: return v } - deref := v.Elem() - derefT := deref.Type() - if isStructTypeConvertibleToMap(derefT, true, tagName) { - return deref +} + +func hasAnyTag(field reflect.StructField, tagName string) bool { + _, ok := getTagValue(field, tagName) + return ok +} + +func getTagParts(field reflect.StructField, tagName string) []string { + tagValue, ok := getTagValue(field, tagName) + if !ok { + return nil } - return v + return strings.Split(tagValue, ",") +} + +func getTagValue(field reflect.StructField, tagName string) (string, bool) { + for _, name := range splitTagNames(tagName) { + if tag := field.Tag.Get(name); tag != "" { + return tag, true + } + } + return "", false +} + +func splitTagNames(tagName string) []string { + if tagName == "" { + return []string{"mapstructure"} + } + parts := strings.Split(tagName, ",") + result := make([]string, 0, len(parts)) + + for _, name := range parts { + name = strings.TrimSpace(name) + if name != "" { + result = append(result, name) + } + } + + return result +} + +// unmarshalerType is cached for performance +var unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() + +// getUnmarshaler checks if the value implements Unmarshaler and returns +// the Unmarshaler and a boolean indicating if it was found. It handles both +// pointer and value receivers. +func getUnmarshaler(val reflect.Value) (Unmarshaler, bool) { + // Skip invalid or nil values + if !val.IsValid() { + return nil, false + } + + switch val.Kind() { + case reflect.Pointer, reflect.Interface: + if val.IsNil() { + return nil, false + } + } + + // Check pointer receiver first (most common case) + if val.CanAddr() { + ptrVal := val.Addr() + // Quick check: if no methods, can't implement any interface + if ptrVal.Type().NumMethod() > 0 && ptrVal.Type().Implements(unmarshalerType) { + return ptrVal.Interface().(Unmarshaler), true + } + } + + // Check value receiver + // Quick check: if no methods, can't implement any interface + if val.Type().NumMethod() > 0 && val.CanInterface() && val.Type().Implements(unmarshalerType) { + return val.Interface().(Unmarshaler), true + } + + return nil, false } diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/buildssa/buildssa.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/buildssa/buildssa.go index 37c878ef3..017415f91 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/buildssa/buildssa.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/buildssa/buildssa.go @@ -16,9 +16,7 @@ import ( "golang.org/x/tools/go/analysis" "golang.org/x/tools/go/analysis/passes/ctrlflow" - "golang.org/x/tools/go/analysis/passes/internal/ctrlflowinternal" "golang.org/x/tools/go/ssa" - "golang.org/x/tools/internal/ssainternal" ) var Analyzer = &analysis.Analyzer{ @@ -62,9 +60,7 @@ func run(pass *analysis.Pass) (any, error) { prog := ssa.NewProgram(pass.Fset, mode) // Use the result of the ctrlflow analysis to improve the SSA CFG. - ssainternal.SetNoReturn(prog, func(fn *types.Func) bool { - return ctrlflowinternal.NoReturn(cfgs, fn) - }) + prog.SetNoReturn(cfgs.NoReturn) // Create SSA packages for direct imports. for _, p := range pass.Pkg.Imports() { diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/ctrlflow/ctrlflow.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/ctrlflow/ctrlflow.go index b84c8d6fe..4e6ea9d67 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/ctrlflow/ctrlflow.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/ctrlflow/ctrlflow.go @@ -16,11 +16,9 @@ import ( "golang.org/x/tools/go/analysis" "golang.org/x/tools/go/analysis/passes/inspect" - "golang.org/x/tools/go/analysis/passes/internal/ctrlflowinternal" "golang.org/x/tools/go/ast/inspector" "golang.org/x/tools/go/cfg" "golang.org/x/tools/go/types/typeutil" - "golang.org/x/tools/internal/cfginternal" "golang.org/x/tools/internal/typesinternal" ) @@ -51,18 +49,19 @@ type CFGs struct { pass *analysis.Pass // transient; nil after construction } -// TODO(adonovan): add (*CFGs).NoReturn to public API. -func (c *CFGs) isNoReturn(fn *types.Func) bool { +// NoReturn reports whether the specified control-flow graph cannot return normally. +// +// It is defined for at least all function symbols that appear as the static callee of a +// CallExpr in the current package, even if the callee was imported from a dependency. +// +// The result may incorporate interprocedural information based on induction of +// the "no return" property over the static call graph within the package. +// For example, if f simply calls g and g always calls os.Exit, then both f and g may +// be deemed never to return. +func (c *CFGs) NoReturn(fn *types.Func) bool { return c.noReturn[fn] } -func init() { - // Expose the hidden method to callers in x/tools. - ctrlflowinternal.NoReturn = func(c any, fn *types.Func) bool { - return c.(*CFGs).isNoReturn(fn) - } -} - // CFGs has two maps: funcDecls for named functions and funcLits for // unnamed ones. Unlike funcLits, the funcDecls map is not keyed by its // syntax node, *ast.FuncDecl, because callMayReturn needs to do a @@ -154,7 +153,7 @@ func run(pass *analysis.Pass) (any, error) { li := funcLits[lit] if li.cfg == nil { li.cfg = cfg.New(lit.Body, c.callMayReturn) - if cfginternal.IsNoReturn(li.cfg) { + if li.cfg.NoReturn() { li.noReturn = true } } @@ -183,7 +182,7 @@ func (c *CFGs) buildDecl(fn *types.Func, di *declInfo) { if !known { if di.decl.Body != nil { di.cfg = cfg.New(di.decl.Body, c.callMayReturn) - if cfginternal.IsNoReturn(di.cfg) { + if di.cfg.NoReturn() { noreturn = true } } @@ -245,7 +244,17 @@ func knownIntrinsic(fn *types.Func) (noreturn, known bool) { // Functions known intrinsically never to return. if typesinternal.IsFunctionNamed(fn, "syscall", "Exit", "ExitProcess", "ExitThread") || - typesinternal.IsFunctionNamed(fn, "runtime", "Goexit") { + typesinternal.IsFunctionNamed(fn, "runtime", "Goexit", "fatalthrow", "fatalpanic", "exit") || + // Following staticcheck (see go/ir/exits.go) we include functions + // in several popular logging packages whose no-return status is + // beyond the analysis to infer. + // TODO(adonovan): make this list extensible. + typesinternal.IsMethodNamed(fn, "go.uber.org/zap", "Logger", "Fatal", "Panic") || + typesinternal.IsMethodNamed(fn, "go.uber.org/zap", "SugaredLogger", "Fatal", "Fatalw", "Fatalf", "Panic", "Panicw", "Panicf") || + typesinternal.IsMethodNamed(fn, "github.com/sirupsen/logrus", "Logger", "Exit", "Panic", "Panicf", "Panicln") || + typesinternal.IsMethodNamed(fn, "github.com/sirupsen/logrus", "Entry", "Panicf", "Panicln") || + typesinternal.IsFunctionNamed(fn, "k8s.io/klog", "Exit", "ExitDepth", "Exitf", "Exitln", "Fatal", "FatalDepth", "Fatalf", "Fatalln") || + typesinternal.IsFunctionNamed(fn, "k8s.io/klog/v2", "Exit", "ExitDepth", "Exitf", "Exitln", "Fatal", "FatalDepth", "Fatalf", "Fatalln") { return true, true } diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/internal/ctrlflowinternal/ctrlflowinternal.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/internal/ctrlflowinternal/ctrlflowinternal.go deleted file mode 100644 index ee7a37228..000000000 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/internal/ctrlflowinternal/ctrlflowinternal.go +++ /dev/null @@ -1,17 +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 ctrlflowinternal exposes internals of ctrlflow. -// It cannot actually depend on symbols from ctrlflow. -package ctrlflowinternal - -import "go/types" - -// NoReturn exposes the (*ctrlflow.CFGs).NoReturn method to the buildssa analyzer. -// -// You must link [golang.org/x/tools/go/analysis/passes/ctrlflow] into your -// application for it to be non-nil. -var NoReturn = func(cfgs any, fn *types.Func) bool { - panic("x/tools/go/analysis/passes/ctrlflow is not linked into this application") -} diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/doc.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/doc.go index 03c21fa73..0425faf8d 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/doc.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/doc.go @@ -80,6 +80,8 @@ or b.ResetTimer within the same function will also be removed. Caveats: The b.Loop() method is designed to prevent the compiler from optimizing away the benchmark loop, which can occasionally result in slower execution due to increased allocations in some specific cases. +Since its fix may change the performance of nanosecond-scale benchmarks, +bloop is disabled by default in the `go fix` analyzer suite; see golang/go#74967. # Analyzer any @@ -467,6 +469,25 @@ The sole use of the finished string must be the last reference to the variable s. (It may appear within an intervening loop or function literal, since even s.String() is called repeatedly, it does not allocate memory.) +Often the addend is a call to fmt.Sprintf, as in this example: + + var s string + for x := range seq { + s += fmt.Sprintf("%v", x) + } + +which, once the suggested fix is applied, becomes: + + var s strings.Builder + for x := range seq { + s.WriteString(fmt.Sprintf("%v", x)) + } + +The WriteString call can be further simplified to the more efficient +fmt.Fprintf(&s, "%v", x), avoiding the allocation of an intermediary. +However, stringsbuilder does not perform this simplification; +it requires staticcheck analyzer QF1012. (See https://go.dev/issue/76918.) + # Analyzer testingcontext testingcontext: replace context.WithCancel with t.Context in tests diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/maps.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/maps.go index f97541d4b..795f5b6c6 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/maps.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/maps.go @@ -231,9 +231,28 @@ func mapsloop(pass *analysis.Pass) (any, error) { // Have: for k, v := range x { lhs = rhs } assign := rng.Body.List[0].(*ast.AssignStmt) + + // usesKV reports whether e references vars k or v. + usesKV := func(e ast.Expr) bool { + k := info.Defs[rng.Key.(*ast.Ident)] + v := info.Defs[rng.Value.(*ast.Ident)] + for n := range ast.Preorder(e) { + if id, ok := n.(*ast.Ident); ok { + obj := info.Uses[id] + if obj != nil && // don't rely on k, v being non-nil + (obj == k || obj == v) { + return true + } + } + } + return false + } + if index, ok := assign.Lhs[0].(*ast.IndexExpr); ok && + len(assign.Lhs) == 1 && astutil.EqualSyntax(rng.Key, index.Index) && - astutil.EqualSyntax(rng.Value, assign.Rhs[0]) { + astutil.EqualSyntax(rng.Value, assign.Rhs[0]) && + !usesKV(index.X) { // reject (e.g.) f(k, v)[k] = v if tmap, ok := typeparams.CoreType(info.TypeOf(index.X)).(*types.Map); ok && types.Identical(info.TypeOf(index), info.TypeOf(rng.Value)) && // m[k], v types.Identical(tmap.Key(), info.TypeOf(rng.Key)) { 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 da988a78a..f2947b1d8 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 @@ -34,7 +34,7 @@ var doc string var Suite = []*analysis.Analyzer{ AnyAnalyzer, // AppendClippedAnalyzer, // not nil-preserving! - BLoopAnalyzer, + // BLoopAnalyzer, // may skew benchmark results, see golang/go#74967 FmtAppendfAnalyzer, ForVarAnalyzer, MapsLoopAnalyzer, @@ -142,3 +142,5 @@ func lookup(info *types.Info, cur inspector.Cursor, name string) types.Object { _, obj := scope.LookupParent(name, cur.Node().Pos()) return obj } + +func first[T any](x T, _ any) T { return x } diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/newexpr.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/newexpr.go index 6cb75f247..cd924ec85 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/newexpr.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/newexpr.go @@ -25,7 +25,7 @@ import ( var NewExprAnalyzer = &analysis.Analyzer{ Name: "newexpr", Doc: analyzerutil.MustExtractDoc(doc, "newexpr"), - URL: "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize#newexpr", + URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize#newexpr", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, FactTypes: []analysis.Fact{&newLike{}}, diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/rangeint.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/rangeint.go index c42ec58ec..fccd6e580 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/rangeint.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/rangeint.go @@ -18,6 +18,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/typesinternal" "golang.org/x/tools/internal/typesinternal/typeindex" "golang.org/x/tools/internal/versions" @@ -122,9 +123,21 @@ func rangeint(pass *analysis.Pass) (any, error) { continue nextLoop } + validIncrement := false if inc, ok := loop.Post.(*ast.IncDecStmt); ok && inc.Tok == token.INC && astutil.EqualSyntax(compare.X, inc.X) { + // Have: i++ + validIncrement = true + } else if assign, ok := loop.Post.(*ast.AssignStmt); ok && + assign.Tok == token.ADD_ASSIGN && + len(assign.Rhs) == 1 && isIntLiteral(info, assign.Rhs[0], 1) && + len(assign.Lhs) == 1 && astutil.EqualSyntax(compare.X, assign.Lhs[0]) { + // Have: i += 1 + validIncrement = true + } + + if validIncrement { // Have: for i = 0; i < limit; i++ {} // Find references to i within the loop body. @@ -133,6 +146,14 @@ func rangeint(pass *analysis.Pass) (any, error) { if typesinternal.IsPackageLevel(v) { continue nextLoop } + + // If v is a named result, it is implicitly + // used after the loop (go.dev/issue/76880). + // TODO(adonovan): use go1.25 v.Kind() == types.ResultVar. + if moreiters.Contains(enclosingSignature(curLoop, info).Results().Variables(), v) { + continue nextLoop + } + used := false for curId := range curLoop.Child(loop.Body).Preorder((*ast.Ident)(nil)) { id := curId.Node().(*ast.Ident) @@ -237,7 +258,7 @@ func rangeint(pass *analysis.Pass) (any, error) { pass.Report(analysis.Diagnostic{ Pos: init.Pos(), - End: inc.End(), + End: loop.Post.End(), Message: "for loop can be modernized using range over int", SuggestedFixes: []analysis.SuggestedFix{{ Message: fmt.Sprintf("Replace for loop with range %s", @@ -263,7 +284,7 @@ func rangeint(pass *analysis.Pass) (any, error) { // Delete inc. { Pos: limit.End(), - End: inc.End(), + End: loop.Post.End(), }, // Add ")" after limit, if needed. { @@ -320,3 +341,24 @@ func isScalarLvalue(info *types.Info, curId inspector.Cursor) bool { } return false } + +// enclosingSignature returns the signature of the innermost +// function enclosing the syntax node denoted by cur +// or nil if the node is not within a function. +// +// TODO(adonovan): factor with gopls/internal/util/typesutil.EnclosingSignature. +func enclosingSignature(cur inspector.Cursor, info *types.Info) *types.Signature { + if c, ok := enclosingFunc(cur); ok { + switch n := c.Node().(type) { + case *ast.FuncDecl: + if f, ok := info.Defs[n.Name]; ok { + return f.Type().(*types.Signature) + } + case *ast.FuncLit: + if f, ok := info.Types[n]; ok { + return f.Type.(*types.Signature) + } + } + } + return nil +} diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/slices.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/slices.go index 960a46644..6c8ea22b3 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/slices.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/slices.go @@ -144,8 +144,7 @@ func appendclipped(pass *analysis.Pass) (any, error) { // https://go.dev/issue/70815#issuecomment-2671572984 fileImports := func(path string) bool { return slices.ContainsFunc(file.Imports, func(spec *ast.ImportSpec) bool { - value, _ := strconv.Unquote(spec.Path.Value) - return value == path + return first(strconv.Unquote(spec.Path.Value)) == path }) } clonepkg := cond( diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stditerators.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stditerators.go index f7318b123..95f2127fb 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stditerators.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stditerators.go @@ -220,7 +220,7 @@ func stditerators(pass *analysis.Pass) (any, error) { ) // Analyze enclosing loop. - switch ek, _ := curLenCall.ParentEdge(); ek { + switch first(curLenCall.ParentEdge()) { case edge.BinaryExpr_Y: // pattern 1: for i := 0; i < x.Len(); i++ { ... } var ( diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringsbuilder.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringsbuilder.go index 56c5d0e3b..3cb266986 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringsbuilder.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringsbuilder.go @@ -5,11 +5,14 @@ package modernize import ( + "cmp" "fmt" "go/ast" "go/constant" "go/token" "go/types" + "maps" + "slices" "golang.org/x/tools/go/analysis" "golang.org/x/tools/go/analysis/passes/inspect" @@ -61,24 +64,44 @@ func stringsbuilder(pass *analysis.Pass) (any, error) { } } + lexicalOrder := func(x, y *types.Var) int { return cmp.Compare(x.Pos(), y.Pos()) } + + // File and Pos of last fix edit, + // for overlapping fix span detection. + var ( + lastEditFile *ast.File + lastEditEnd token.Pos + ) + // Now check each candidate variable's decl and uses. nextcand: - for v := range candidates { + for _, v := range slices.SortedFunc(maps.Keys(candidates), lexicalOrder) { var edits []analysis.TextEdit - // Check declaration of s: + // Check declaration of s has one of these forms: // // s := expr // var s [string] [= expr] + // var ( ...; s [string] [= expr] ) (s is last) // - // and transform to: + // and transform to one of: // - // var s strings.Builder; s.WriteString(expr) + // var s strings.Builder ; s.WriteString(expr) + // var ( s strings.Builder); s.WriteString(expr) // def, ok := index.Def(v) if !ok { continue } + + // To avoid semantic conflicts, do not offer a fix if its edit + // range (ignoring import edits) overlaps a previous fix. + // This fixes #76983 and is an ad-hoc mitigation of #76476. + file := astutil.EnclosingFile(def) + if file == lastEditFile && v.Pos() < lastEditEnd { + continue + } + ek, _ := def.ParentEdge() if ek == edge.AssignStmt_Lhs && len(def.Parent().Node().(*ast.AssignStmt).Lhs) == 1 { @@ -132,9 +155,20 @@ nextcand: } } else if ek == edge.ValueSpec_Names && - len(def.Parent().Node().(*ast.ValueSpec).Names) == 1 { - // Have: var s [string] [= expr] + len(def.Parent().Node().(*ast.ValueSpec).Names) == 1 && + first(def.Parent().Parent().LastChild()) == def.Parent() { + // Have: var s [string] [= expr] + // or: var ( s [string] [= expr] ) // => var s strings.Builder; s.WriteString(expr) + // + // The LastChild check rejects this case: + // var ( s [string] [= expr]; others... ) + // => + // var ( s strings.Builder; others... ); s.WriteString(expr) + // since it moves 'expr' across 'others', requiring + // reformatting of syntax, which in general is lossy + // of comments and vertical space. + // We expect this to be rare. // Add strings import. prefix, importEdits := refactor.AddImport( @@ -149,6 +183,8 @@ nextcand: init = spec.Type.End() } + // Replace (possibly absent) type: + // // var s [string] // ---------------- // var s strings.Builder @@ -159,6 +195,25 @@ nextcand: }) if len(spec.Values) > 0 && !isEmptyString(pass.TypesInfo, spec.Values[0]) { + if decl.Rparen.IsValid() { + // var decl with explicit parens: + // + // var ( ... = expr ) + // - - + // var ( ... ); s.WriteString(expr) + edits = append(edits, []analysis.TextEdit{ + { + Pos: init, + End: init, + NewText: []byte(")"), + }, + { + Pos: spec.Values[0].End(), + End: decl.End(), + }, + }...) + } + // = expr // ---------------- - // ; s.WriteString(expr) @@ -169,8 +224,8 @@ nextcand: NewText: fmt.Appendf(nil, "; %s.WriteString(", v.Name()), }, { - Pos: decl.End(), - End: decl.End(), + Pos: spec.Values[0].End(), + End: spec.Values[0].End(), NewText: []byte(")"), }, }...) @@ -303,6 +358,9 @@ nextcand: continue nextcand // no += in a loop; reject } + lastEditFile = file + lastEditEnd = edits[len(edits)-1].End + pass.Report(analysis.Diagnostic{ Pos: loopAssign.Pos(), End: loopAssign.End(), diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscut.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscut.go index 954997ad6..08ce2a808 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscut.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscut.go @@ -36,7 +36,7 @@ var stringscutAnalyzer = &analysis.Analyzer{ typeindexanalyzer.Analyzer, }, Run: stringscut, - URL: "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize#stringscut", + URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize#stringscut", } func init() { diff --git a/tools/vendor/golang.org/x/tools/go/analysis/passes/stdversion/stdversion.go b/tools/vendor/golang.org/x/tools/go/analysis/passes/stdversion/stdversion.go index 314721956..d1fda880e 100644 --- a/tools/vendor/golang.org/x/tools/go/analysis/passes/stdversion/stdversion.go +++ b/tools/vendor/golang.org/x/tools/go/analysis/passes/stdversion/stdversion.go @@ -99,6 +99,13 @@ func run(pass *analysis.Pass) (any, error) { if obj, ok := pass.TypesInfo.Uses[n]; ok && obj.Pkg() != nil { disallowed := disallowedSymbols(obj.Pkg(), fileVersion) if minVersion, ok := disallowed[origin(obj)]; ok { + // Some symbols are accessible before their release but + // only with specific build tags unknown to us here. + // Avoid false positives in such cases. + // TODO(mkalil): move this check into typesinternal.TooNewStdSymbols. + if obj.Pkg().Path() == "testing/synctest" && versions.AtLeast(fileVersion, "go1.24") { + break // requires go1.24 && goexperiment.synctest || go1.25 + } noun := "module" if fileVersion != pkgVersion { noun = "file" diff --git a/tools/vendor/golang.org/x/tools/go/ast/inspector/cursor.go b/tools/vendor/golang.org/x/tools/go/ast/inspector/cursor.go index fc9bbc714..60ad425f3 100644 --- a/tools/vendor/golang.org/x/tools/go/ast/inspector/cursor.go +++ b/tools/vendor/golang.org/x/tools/go/ast/inspector/cursor.go @@ -453,6 +453,9 @@ func (c Cursor) FindNode(n ast.Node) (Cursor, bool) { // rooted at c such that n.Pos() <= start && end <= n.End(). // (For an *ast.File, it uses the bounds n.FileStart-n.FileEnd.) // +// An empty range (start == end) between two adjacent nodes is +// considered to belong to the first node. +// // It returns zero if none is found. // Precondition: start <= end. // @@ -501,10 +504,17 @@ func (c Cursor) FindByPos(start, end token.Pos) (Cursor, bool) { break // disjoint, after; stop } } + // Inv: node.{Pos,FileStart} <= start if end <= nodeEnd { // node fully contains target range best = i + + // Don't search beyond end of the first match. + // This is important only for an empty range (start=end) + // between two adjoining nodes, which would otherwise + // match both nodes; we want to match only the first. + limit = ev.index } else if nodeEnd < start { i = ev.index // disjoint, before; skip forward } diff --git a/tools/vendor/golang.org/x/tools/go/cfg/cfg.go b/tools/vendor/golang.org/x/tools/go/cfg/cfg.go index 38aba77c2..f69912c80 100644 --- a/tools/vendor/golang.org/x/tools/go/cfg/cfg.go +++ b/tools/vendor/golang.org/x/tools/go/cfg/cfg.go @@ -47,8 +47,6 @@ import ( "go/ast" "go/format" "go/token" - - "golang.org/x/tools/internal/cfginternal" ) // A CFG represents the control-flow graph of a single function. @@ -59,6 +57,9 @@ type CFG struct { noreturn bool // function body lacks a reachable return statement } +// NoReturn reports whether the function has no reachable return. +func (cfg *CFG) NoReturn() bool { return cfg.noreturn } + // A Block represents a basic block: a list of statements and // expressions that are always evaluated sequentially. // @@ -184,14 +185,6 @@ func New(body *ast.BlockStmt, mayReturn func(*ast.CallExpr) bool) *CFG { return &CFG{Blocks: b.blocks, noreturn: noreturn} } -// isNoReturn reports whether the function has no reachable return. -// TODO(adonovan): add (*CFG).NoReturn to public API. -func isNoReturn(_cfg any) bool { return _cfg.(*CFG).noreturn } - -func init() { - cfginternal.IsNoReturn = isNoReturn // expose to ctrlflow analyzer -} - func (b *Block) String() string { return fmt.Sprintf("block %d (%s)", b.Index, b.comment(nil)) } 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 bbf88567c..d94cb6fb7 100644 --- a/tools/vendor/golang.org/x/tools/go/ssa/create.go +++ b/tools/vendor/golang.org/x/tools/go/ssa/create.go @@ -15,7 +15,6 @@ import ( "os" "sync" - "golang.org/x/tools/internal/ssainternal" "golang.org/x/tools/internal/versions" ) @@ -314,19 +313,13 @@ func (prog *Program) ImportedPackage(path string) *Package { return prog.imported[path] } -// setNoReturn sets the predicate used by the SSA builder to decide -// whether a call to the specified named function cannot return, -// allowing the builder to prune control-flow edges following the -// call, thus improving the precision of downstream analysis. +// SetNoReturn sets the predicate used when building the ssa.Program +// prog that reports whether a given function cannot return. +// This may be used to prune spurious control flow edges +// after (e.g.) log.Fatal, improving the precision of analyses. // -// TODO(adonovan): add (*Program).SetNoReturn to the public API. -func (prog *Program) setNoReturn(noReturn func(*types.Func) bool) { +// A typical implementation is the [ctrlflow.CFGs.NoReturn] method from +// [golang.org/x/tools/go/analysis/passes/ctrlflow]. +func (prog *Program) SetNoReturn(noReturn func(*types.Func) bool) { prog.noReturn = noReturn } - -func init() { - // SetNoReturn exposes Program.setNoReturn to the buildssa analyzer. - ssainternal.SetNoReturn = func(prog any, noReturn func(*types.Func) bool) { - prog.(*Program).setNoReturn(noReturn) - } -} diff --git a/tools/vendor/golang.org/x/tools/internal/astutil/util.go b/tools/vendor/golang.org/x/tools/internal/astutil/util.go index 6986a5187..6820ba4cd 100644 --- a/tools/vendor/golang.org/x/tools/internal/astutil/util.go +++ b/tools/vendor/golang.org/x/tools/internal/astutil/util.go @@ -178,6 +178,9 @@ func (r Range) IsValid() bool { return r.Start.IsValid() && r.Start <= r.EndPos // // Select returns the enclosing BlockStmt, the f() CallExpr, and the g() CallExpr. // +// If the selection does not wholly enclose any nodes, Select returns an error +// and invalid start/end nodes, but it may return a valid enclosing node. +// // Callers that require exactly one syntax tree (e.g. just f() or just // g()) should check that the returned start and end nodes are // identical. @@ -214,7 +217,12 @@ func Select(curFile inspector.Cursor, start, end token.Pos) (_enclosing, _start, } } if !CursorValid(curStart) { - return noCursor, noCursor, noCursor, fmt.Errorf("no syntax selected") + // The selection is valid (inside curEnclosing) but contains no + // complete nodes. This happens for point selections (start == end), + // or selections covering only only spaces, comments, and punctuation + // tokens. + // Return the enclosing node so the caller can still use the context. + return curEnclosing, noCursor, noCursor, fmt.Errorf("invalid selection") } return curEnclosing, curStart, curEnd, nil } diff --git a/tools/vendor/golang.org/x/tools/internal/cfginternal/cfginternal.go b/tools/vendor/golang.org/x/tools/internal/cfginternal/cfginternal.go deleted file mode 100644 index a9b6236f4..000000000 --- a/tools/vendor/golang.org/x/tools/internal/cfginternal/cfginternal.go +++ /dev/null @@ -1,16 +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 cfginternal exposes internals of go/cfg. -// It cannot actually depend on symbols from go/cfg. -package cfginternal - -// IsNoReturn exposes (*cfg.CFG).noReturn to the ctrlflow analyzer. -// TODO(adonovan): add CFG.NoReturn to the public API. -// -// You must link [golang.org/x/tools/go/cfg] into your application for -// this function to be non-nil. -var IsNoReturn = func(cfg any) bool { - panic("golang.org/x/tools/go/cfg not linked into application") -} diff --git a/tools/vendor/golang.org/x/tools/internal/modindex/index.go b/tools/vendor/golang.org/x/tools/internal/modindex/index.go index c41d1dd90..c7ef97dcd 100644 --- a/tools/vendor/golang.org/x/tools/internal/modindex/index.go +++ b/tools/vendor/golang.org/x/tools/internal/modindex/index.go @@ -10,7 +10,6 @@ import ( "encoding/csv" "fmt" "io" - "log" "os" "path/filepath" "strconv" @@ -107,14 +106,14 @@ var IndexDir string = func() string { var err error dir, err = os.UserCacheDir() // shouldn't happen, but TempDir is better than - // creating ./go/imports + // creating ./goimports if err != nil { dir = os.TempDir() } } dir = filepath.Join(dir, "goimports") if err := os.MkdirAll(dir, 0777); err != nil { - log.Printf("failed to create modcache index dir: %v", err) + dir = "" // #75505, people complain about the error message } return dir }() @@ -127,6 +126,9 @@ func Read(gomodcache string) (*Index, error) { if err != nil { return nil, err } + if IndexDir == "" { + return nil, os.ErrNotExist + } // Read the "link" file for the specified gomodcache directory. // It names the payload file. @@ -227,6 +229,9 @@ func readIndexFrom(gomodcache string, r io.Reader) (*Index, error) { // write writes the index file and updates the index directory to refer to it. func write(gomodcache string, ix *Index) error { + if IndexDir == "" { + return os.ErrNotExist + } // Write the index into a payload file with a fresh name. f, err := os.CreateTemp(IndexDir, fmt.Sprintf("index-%d-*", CurrentVersion)) if err != nil { diff --git a/tools/vendor/golang.org/x/tools/internal/ssainternal/ssainternal.go b/tools/vendor/golang.org/x/tools/internal/ssainternal/ssainternal.go deleted file mode 100644 index 686c5d97d..000000000 --- a/tools/vendor/golang.org/x/tools/internal/ssainternal/ssainternal.go +++ /dev/null @@ -1,22 +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 ssainternal exposes setters for internals of go/ssa. -// It cannot actually depend on symbols from go/ssa. -package ssainternal - -import "go/types" - -// SetNoReturn sets the predicate used when building the ssa.Program -// prog that reports whether a given function cannot return. -// This may be used to prune spurious control flow edges -// after (e.g.) log.Fatal, improving the precision of analyses. -// -// You must link [golang.org/x/tools/go/ssa] into your application for -// this function to be non-nil. -// -// TODO(adonovan): add (*ssa.Program).SetNoReturn to the public API. -var SetNoReturn = func(prog any, noreturn func(*types.Func) bool) { - panic("golang.org/x/tools/go/ssa not linked into application") -} diff --git a/tools/vendor/golang.org/x/tools/internal/stdlib/deps.go b/tools/vendor/golang.org/x/tools/internal/stdlib/deps.go index f7b9c1286..f41431c94 100644 --- a/tools/vendor/golang.org/x/tools/internal/stdlib/deps.go +++ b/tools/vendor/golang.org/x/tools/internal/stdlib/deps.go @@ -12,364 +12,366 @@ type pkginfo struct { } var deps = [...]pkginfo{ - {"archive/tar", "\x03p\x03F=\x01\n\x01$\x01\x01\x02\x05\b\x02\x01\x02\x02\f"}, - {"archive/zip", "\x02\x04f\a\x03\x13\x021=\x01+\x05\x01\x0f\x03\x02\x0e\x04"}, - {"bufio", "\x03p\x86\x01D\x14"}, - {"bytes", "s+[\x03\fG\x02\x02"}, + {"archive/tar", "\x03q\x03F=\x01\n\x01$\x01\x01\x02\x05\b\x02\x01\x02\x02\r"}, + {"archive/zip", "\x02\x04g\a\x03\x13\x021=\x01+\x05\x01\x0f\x03\x02\x0f\x04"}, + {"bufio", "\x03q\x86\x01D\x15"}, + {"bytes", "t+[\x03\fH\x02\x02"}, {"cmp", ""}, - {"compress/bzip2", "\x02\x02\xf5\x01A"}, - {"compress/flate", "\x02q\x03\x83\x01\f\x033\x01\x03"}, - {"compress/gzip", "\x02\x04f\a\x03\x15nT"}, - {"compress/lzw", "\x02q\x03\x83\x01"}, - {"compress/zlib", "\x02\x04f\a\x03\x13\x01o"}, - {"container/heap", "\xbb\x02"}, + {"compress/bzip2", "\x02\x02\xf6\x01A"}, + {"compress/flate", "\x02r\x03\x83\x01\f\x033\x01\x03"}, + {"compress/gzip", "\x02\x04g\a\x03\x15nU"}, + {"compress/lzw", "\x02r\x03\x83\x01"}, + {"compress/zlib", "\x02\x04g\a\x03\x13\x01o"}, + {"container/heap", "\xbc\x02"}, {"container/list", ""}, {"container/ring", ""}, - {"context", "s\\p\x01\r"}, - {"crypto", "\x89\x01pC"}, - {"crypto/aes", "\x10\n\t\x99\x02"}, - {"crypto/cipher", "\x03 \x01\x01 \x12\x1c,Z"}, - {"crypto/des", "\x10\x15 .,\x9d\x01\x03"}, - {"crypto/dsa", "E\x04*\x86\x01\r"}, - {"crypto/ecdh", "\x03\v\f\x10\x04\x17\x04\x0e\x1c\x86\x01"}, - {"crypto/ecdsa", "\x0e\x05\x03\x04\x01\x10\b\v\x06\x01\x04\r\x01\x1c\x86\x01\r\x05K\x01"}, - {"crypto/ed25519", "\x0e\x1e\x12\a\v\a\x1c\x86\x01C"}, - {"crypto/elliptic", "3@\x86\x01\r9"}, - {"crypto/fips140", "\"\x05"}, - {"crypto/hkdf", "/\x15\x01.\x16"}, - {"crypto/hmac", "\x1a\x16\x14\x01\x122"}, - {"crypto/internal/boring", "\x0e\x02\rl"}, - {"crypto/internal/boring/bbig", "\x1a\xec\x01M"}, - {"crypto/internal/boring/bcache", "\xc0\x02\x13"}, + {"context", "t\\p\x01\x0e"}, + {"crypto", "\x8a\x01pC"}, + {"crypto/aes", "\x10\v\t\x99\x02"}, + {"crypto/cipher", "\x03!\x01\x01 \x12\x1c,Z"}, + {"crypto/des", "\x10\x16 .,\x9d\x01\x03"}, + {"crypto/dsa", "F\x03+\x86\x01\r"}, + {"crypto/ecdh", "\x03\v\r\x10\x04\x17\x03\x0f\x1c\x86\x01"}, + {"crypto/ecdsa", "\x0e\x05\x03\x05\x01\x10\b\v\x06\x01\x03\x0e\x01\x1c\x86\x01\r\x05L\x01"}, + {"crypto/ed25519", "\x0e\x1f\x12\a\x03\b\a\x1cI=C"}, + {"crypto/elliptic", "4@\x86\x01\r9"}, + {"crypto/fips140", "#\x05\x95\x01\x98\x01"}, + {"crypto/hkdf", "0\x15\x01.\x16"}, + {"crypto/hmac", "\x1b\x16\x14\x01\x122"}, + {"crypto/hpke", "\x03\v\x02\x03\x04\x01\f\x01\x05\x1f\x05\a\x01\x01\x1d\x03\x13\x16\x9b\x01\x1c"}, + {"crypto/internal/boring", "\x0e\x02\x0el"}, + {"crypto/internal/boring/bbig", "\x1b\xec\x01N"}, + {"crypto/internal/boring/bcache", "\xc1\x02\x14"}, {"crypto/internal/boring/sig", ""}, {"crypto/internal/constanttime", ""}, - {"crypto/internal/cryptotest", "\x03\r\n\b&\x0f\x19\x06\x13\x12 \x04\x06\t\x19\x01\x11\x11\x1b\x01\a\x05\b\x03\x05\v"}, - {"crypto/internal/entropy", "J"}, - {"crypto/internal/entropy/v1.0.0", "C0\x95\x018\x13"}, - {"crypto/internal/fips140", "B1\xbf\x01\v\x16"}, - {"crypto/internal/fips140/aes", "\x03\x1f\x03\x02\x14\x05\x01\x01\x06+\x95\x014"}, - {"crypto/internal/fips140/aes/gcm", "\"\x01\x02\x02\x02\x12\x05\x01\a+\x92\x01"}, - {"crypto/internal/fips140/alias", "\xd3\x02"}, - {"crypto/internal/fips140/bigmod", "'\x19\x01\a+\x95\x01"}, - {"crypto/internal/fips140/check", "\"\x0e\a\t\x02\xb7\x01Z"}, - {"crypto/internal/fips140/check/checktest", "'\x8b\x02!"}, - {"crypto/internal/fips140/drbg", "\x03\x1e\x01\x01\x04\x14\x05\t\x01)\x86\x01\x0f7\x01"}, - {"crypto/internal/fips140/ecdh", "\x03\x1f\x05\x02\n\r3\x86\x01\x0f7"}, - {"crypto/internal/fips140/ecdsa", "\x03\x1f\x04\x01\x02\a\x03\x06:\x16pF"}, - {"crypto/internal/fips140/ed25519", "\x03\x1f\x05\x02\x04\f:\xc9\x01\x03"}, - {"crypto/internal/fips140/edwards25519", "\x1e\t\a\x123\x95\x017"}, - {"crypto/internal/fips140/edwards25519/field", "'\x14\x053\x95\x01"}, - {"crypto/internal/fips140/hkdf", "\x03\x1f\x05\t\a<\x16"}, - {"crypto/internal/fips140/hmac", "\x03\x1f\x15\x01\x01:\x16"}, - {"crypto/internal/fips140/mldsa", "\x03\x1b\x04\x05\x02\x0e\x01\x03\x053\x95\x017"}, - {"crypto/internal/fips140/mlkem", "\x03\x1f\x05\x02\x0f\x03\x053\xcc\x01"}, - {"crypto/internal/fips140/nistec", "\x1e\t\r\f3\x95\x01*\r\x14"}, - {"crypto/internal/fips140/nistec/fiat", "'\x148\x95\x01"}, - {"crypto/internal/fips140/pbkdf2", "\x03\x1f\x05\t\a<\x16"}, - {"crypto/internal/fips140/rsa", "\x03\x1b\x04\x04\x01\x02\x0e\x01\x01\x028\x16pF"}, - {"crypto/internal/fips140/sha256", "\x03\x1f\x1e\x01\a+\x16\x7f"}, - {"crypto/internal/fips140/sha3", "\x03\x1f\x19\x05\x012\x95\x01K"}, - {"crypto/internal/fips140/sha512", "\x03\x1f\x1e\x01\a+\x16\x7f"}, - {"crypto/internal/fips140/ssh", "'b"}, - {"crypto/internal/fips140/subtle", "\x1e\a\x1b\xc8\x01"}, - {"crypto/internal/fips140/tls12", "\x03\x1f\x05\t\a\x02:\x16"}, - {"crypto/internal/fips140/tls13", "\x03\x1f\x05\b\b\t3\x16"}, - {"crypto/internal/fips140cache", "\xb2\x02\r&"}, + {"crypto/internal/cryptotest", "\x03\r\v\b%\x10\x19\x06\x13\x12 \x04\x06\t\x19\x01\x11\x11\x1b\x01\a\x05\b\x03\x05\f"}, + {"crypto/internal/entropy", "K"}, + {"crypto/internal/entropy/v1.0.0", "D0\x95\x018\x14"}, + {"crypto/internal/fips140", "C1\xbf\x01\v\x17"}, + {"crypto/internal/fips140/aes", "\x03 \x03\x02\x14\x05\x01\x01\x05,\x95\x014"}, + {"crypto/internal/fips140/aes/gcm", "#\x01\x02\x02\x02\x12\x05\x01\x06,\x92\x01"}, + {"crypto/internal/fips140/alias", "\xd5\x02"}, + {"crypto/internal/fips140/bigmod", "(\x19\x01\x06,\x95\x01"}, + {"crypto/internal/fips140/check", "#\x0e\a\t\x02\xb7\x01["}, + {"crypto/internal/fips140/check/checktest", "(\x8b\x02\""}, + {"crypto/internal/fips140/drbg", "\x03\x1f\x01\x01\x04\x14\x05\n)\x86\x01\x0f7\x01"}, + {"crypto/internal/fips140/ecdh", "\x03 \x05\x02\n\r3\x86\x01\x0f7"}, + {"crypto/internal/fips140/ecdsa", "\x03 \x04\x01\x02\a\x03\x06:\x16pF"}, + {"crypto/internal/fips140/ed25519", "\x03 \x05\x02\x04\f:\xc9\x01\x03"}, + {"crypto/internal/fips140/edwards25519", "\x1f\t\a\x123\x95\x017"}, + {"crypto/internal/fips140/edwards25519/field", "(\x14\x053\x95\x01"}, + {"crypto/internal/fips140/hkdf", "\x03 \x05\t\a<\x16"}, + {"crypto/internal/fips140/hmac", "\x03 \x15\x01\x01:\x16"}, + {"crypto/internal/fips140/mldsa", "\x03\x1c\x04\x05\x02\x0e\x01\x03\x053\x95\x017"}, + {"crypto/internal/fips140/mlkem", "\x03 \x05\x02\x0f\x03\x053\xcc\x01"}, + {"crypto/internal/fips140/nistec", "\x1f\t\r\f3\x95\x01*\r\x15"}, + {"crypto/internal/fips140/nistec/fiat", "(\x148\x95\x01"}, + {"crypto/internal/fips140/pbkdf2", "\x03 \x05\t\a<\x16"}, + {"crypto/internal/fips140/rsa", "\x03\x1c\x04\x04\x01\x02\x0e\x01\x01\x028\x16pF"}, + {"crypto/internal/fips140/sha256", "\x03 \x1e\x01\x06,\x16\x7f"}, + {"crypto/internal/fips140/sha3", "\x03 \x19\x05\x012\x95\x01L"}, + {"crypto/internal/fips140/sha512", "\x03 \x1e\x01\x06,\x16\x7f"}, + {"crypto/internal/fips140/ssh", "(b"}, + {"crypto/internal/fips140/subtle", "\x1f\a\x1b\xc8\x01"}, + {"crypto/internal/fips140/tls12", "\x03 \x05\t\a\x02:\x16"}, + {"crypto/internal/fips140/tls13", "\x03 \x05\b\b\t3\x16"}, + {"crypto/internal/fips140cache", "\xb3\x02\r'"}, {"crypto/internal/fips140deps", ""}, - {"crypto/internal/fips140deps/byteorder", "\x9f\x01"}, - {"crypto/internal/fips140deps/cpu", "\xb4\x01\a"}, - {"crypto/internal/fips140deps/godebug", "\xbc\x01"}, - {"crypto/internal/fips140deps/time", "\xcd\x02"}, - {"crypto/internal/fips140hash", "8\x1d4\xca\x01"}, - {"crypto/internal/fips140only", ")\x0e\x01\x01P3="}, + {"crypto/internal/fips140deps/byteorder", "\xa0\x01"}, + {"crypto/internal/fips140deps/cpu", "\xb5\x01\a"}, + {"crypto/internal/fips140deps/godebug", "\xbd\x01"}, + {"crypto/internal/fips140deps/time", "\xcf\x02"}, + {"crypto/internal/fips140hash", "9\x1d4\xcb\x01"}, + {"crypto/internal/fips140only", "\x17\x13\x0e\x01\x01Pp"}, {"crypto/internal/fips140test", ""}, - {"crypto/internal/hpke", "\x03\v\x01\x01\x03\x055\x03\x04\x01\x01\x16\a\x03\x13\xcc\x01"}, - {"crypto/internal/impl", "\xbd\x02"}, - {"crypto/internal/randutil", "\xf9\x01\x12"}, - {"crypto/internal/sysrand", "sq! \r\r\x01\x01\f\x06"}, - {"crypto/internal/sysrand/internal/seccomp", "s"}, - {"crypto/md5", "\x0e7.\x16\x16i"}, - {"crypto/mlkem", "\x0e$"}, - {"crypto/mlkem/mlkemtest", "2\x1b&"}, - {"crypto/pbkdf2", "5\x0f\x01.\x16"}, - {"crypto/rand", "\x1a\b\a\x1c\x04\x01)\x86\x01\rM"}, - {"crypto/rc4", "% .\xc9\x01"}, - {"crypto/rsa", "\x0e\f\x01\v\x10\x0e\x01\x04\a\a\x1c\x03\x133=\f\x01"}, - {"crypto/sha1", "\x0e\f+\x03+\x16\x16\x15T"}, - {"crypto/sha256", "\x0e\f\x1dR"}, - {"crypto/sha3", "\x0e*Q\xca\x01"}, - {"crypto/sha512", "\x0e\f\x1fP"}, - {"crypto/subtle", "\x1e\x1d\x9f\x01X"}, - {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\t\x01\x0e\n\x01\n\x05\x04\x01\x01\x01\x01\x02\x01\x02\x01\x17\x02\x03\x13\x16\x15\b=\x16\x16\r\b\x01\x01\x01\x02\x01\r\x06\x02\x01\x0f"}, - {"crypto/tls/internal/fips140tls", "\x17\xa9\x02"}, - {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x016\x06\x01\x01\x02\x05\x0e\x06\x02\x02\x03F\x03:\x01\x02\b\x01\x01\x02\a\x10\x05\x01\x06\a\b\x02\x01\x02\x0e\x02\x01\x01\x02\x03\x01"}, - {"crypto/x509/pkix", "i\x06\a\x90\x01G"}, - {"database/sql", "\x03\nP\x16\x03\x83\x01\v\a\"\x05\b\x02\x03\x01\r\x02\x02\x02"}, - {"database/sql/driver", "\rf\x03\xb7\x01\x0f\x11"}, - {"debug/buildinfo", "\x03]\x02\x01\x01\b\a\x03g\x1a\x02\x01+\x0f\x1f"}, - {"debug/dwarf", "\x03i\a\x03\x83\x011\x11\x01\x01"}, - {"debug/elf", "\x03\x06V\r\a\x03g\x1b\x01\f \x17\x01\x16"}, - {"debug/gosym", "\x03i\n\xc5\x01\x01\x01\x02"}, - {"debug/macho", "\x03\x06V\r\ng\x1c,\x17\x01"}, - {"debug/pe", "\x03\x06V\r\a\x03g\x1c,\x17\x01\x16"}, - {"debug/plan9obj", "l\a\x03g\x1c,"}, - {"embed", "s+B\x19\x01S"}, + {"crypto/internal/impl", "\xbe\x02"}, + {"crypto/internal/rand", "\x1b\x0f s=["}, + {"crypto/internal/randutil", "\xfa\x01\x12"}, + {"crypto/internal/sysrand", "tq! \r\r\x01\x01\r\x06"}, + {"crypto/internal/sysrand/internal/seccomp", "t"}, + {"crypto/md5", "\x0e8.\x16\x16i"}, + {"crypto/mlkem", "\x0e%"}, + {"crypto/mlkem/mlkemtest", "3\x13\b&"}, + {"crypto/pbkdf2", "6\x0f\x01.\x16"}, + {"crypto/rand", "\x1b\x0f\x1c\x03+\x86\x01\rN"}, + {"crypto/rc4", "& .\xc9\x01"}, + {"crypto/rsa", "\x0e\r\x01\v\x10\x0e\x01\x03\b\a\x1c\x03\x133=\f\x01"}, + {"crypto/sha1", "\x0e\r+\x02,\x16\x16\x15T"}, + {"crypto/sha256", "\x0e\r\x1dR"}, + {"crypto/sha3", "\x0e+Q\xcb\x01"}, + {"crypto/sha512", "\x0e\r\x1fP"}, + {"crypto/subtle", "\x1f\x1d\x9f\x01z"}, + {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\x01\t\x01\x18\x01\x0f\x01\x03\x01\x01\x01\x01\x02\x01\x02\x01\x17\x02\x03\x13\x16\x15\b=\x16\x16\r\b\x01\x01\x01\x02\x01\x0e\x06\x02\x01\x0f"}, + {"crypto/tls/internal/fips140tls", "\x17\xaa\x02"}, + {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x017\x06\x01\x01\x02\x05\x0e\x06\x02\x02\x03F\x03:\x01\x02\b\x01\x01\x02\a\x10\x05\x01\x06\a\b\x02\x01\x02\x0f\x02\x01\x01\x02\x03\x01"}, + {"crypto/x509/pkix", "j\x06\a\x90\x01H"}, + {"database/sql", "\x03\nQ\x16\x03\x83\x01\v\a\"\x05\b\x02\x03\x01\x0e\x02\x02\x02"}, + {"database/sql/driver", "\rg\x03\xb7\x01\x0f\x12"}, + {"debug/buildinfo", "\x03^\x02\x01\x01\b\a\x03g\x1a\x02\x01+\x0f "}, + {"debug/dwarf", "\x03j\a\x03\x83\x011\x11\x01\x01"}, + {"debug/elf", "\x03\x06W\r\a\x03g\x1b\x01\f \x17\x01\x17"}, + {"debug/gosym", "\x03j\n$\xa1\x01\x01\x01\x02"}, + {"debug/macho", "\x03\x06W\r\ng\x1c,\x17\x01"}, + {"debug/pe", "\x03\x06W\r\a\x03g\x1c,\x17\x01\x17"}, + {"debug/plan9obj", "m\a\x03g\x1c,"}, + {"embed", "t+B\x19\x01T"}, {"embed/internal/embedtest", ""}, {"encoding", ""}, - {"encoding/ascii85", "\xf9\x01C"}, - {"encoding/asn1", "\x03p\x03g(\x01'\r\x02\x01\x10\x03\x01"}, - {"encoding/base32", "\xf9\x01A\x02"}, - {"encoding/base64", "\x9f\x01ZA\x02"}, - {"encoding/binary", "s\x86\x01\f(\r\x05"}, - {"encoding/csv", "\x02\x01p\x03\x83\x01D\x12\x02"}, - {"encoding/gob", "\x02e\x05\a\x03g\x1c\v\x01\x03\x1d\b\x12\x01\x0f\x02"}, - {"encoding/hex", "s\x03\x83\x01A\x03"}, - {"encoding/json", "\x03\x01c\x04\b\x03\x83\x01\f(\r\x02\x01\x02\x10\x01\x01\x02"}, - {"encoding/pem", "\x03h\b\x86\x01A\x03"}, - {"encoding/xml", "\x02\x01d\f\x03\x83\x014\x05\n\x01\x02\x10\x02"}, - {"errors", "\xcf\x01\x84\x01"}, - {"expvar", "pLA\b\v\x15\r\b\x02\x03\x01\x11"}, - {"flag", "g\f\x03\x83\x01,\b\x05\b\x02\x01\x10"}, - {"fmt", "sF'\x19\f \b\r\x02\x03\x12"}, - {"go/ast", "\x03\x01r\x0f\x01s\x03)\b\r\x02\x01\x12\x02"}, - {"go/build", "\x02\x01p\x03\x01\x02\x02\b\x02\x01\x17\x1f\x04\x02\b\x1c\x13\x01+\x01\x04\x01\a\b\x02\x01\x12\x02\x02"}, - {"go/build/constraint", "s\xc9\x01\x01\x12\x02"}, - {"go/constant", "v\x10\x7f\x01\x024\x01\x02\x12"}, - {"go/doc", "\x04r\x01\x05\n=61\x10\x02\x01\x12\x02"}, - {"go/doc/comment", "\x03s\xc4\x01\x01\x01\x01\x12\x02"}, - {"go/format", "\x03s\x01\f\x01\x02sD"}, - {"go/importer", "x\a\x01\x02\x04\x01r9"}, - {"go/internal/gccgoimporter", "\x02\x01]\x13\x03\x04\f\x01p\x02,\x01\x05\x11\x01\f\b"}, - {"go/internal/gcimporter", "\x02t\x10\x010\x05\r0,\x15\x03\x02"}, - {"go/internal/scannerhooks", "\x86\x01"}, - {"go/internal/srcimporter", "v\x01\x01\v\x03\x01r,\x01\x05\x12\x02\x14"}, - {"go/parser", "\x03p\x03\x01\x02\b\x04\x01s\x01+\x06\x12"}, - {"go/printer", "v\x01\x02\x03\ns\f \x15\x02\x01\x02\v\x05\x02"}, - {"go/scanner", "\x03s\v\x05s2\x10\x01\x13\x02"}, - {"go/token", "\x04r\x86\x01>\x02\x03\x01\x0f\x02"}, - {"go/types", "\x03\x01\x06i\x03\x01\x03\t\x03\x024\x063\x04\x03\t \x06\a\b\x01\x01\x01\x02\x01\x0f\x02\x02"}, - {"go/version", "\xc1\x01|"}, - {"hash", "\xf9\x01"}, - {"hash/adler32", "s\x16\x16"}, - {"hash/crc32", "s\x16\x16\x15\x8b\x01\x01\x13"}, - {"hash/crc64", "s\x16\x16\xa0\x01"}, - {"hash/fnv", "s\x16\x16i"}, - {"hash/maphash", "\x89\x01\x11<}"}, - {"html", "\xbd\x02\x02\x12"}, - {"html/template", "\x03m\x06\x19-=\x01\n!\x05\x01\x02\x03\f\x01\x02\f\x01\x03\x02"}, - {"image", "\x02q\x1fg\x0f4\x03\x01"}, + {"encoding/ascii85", "\xfa\x01C"}, + {"encoding/asn1", "\x03q\x03g(\x01'\r\x02\x01\x11\x03\x01"}, + {"encoding/base32", "\xfa\x01A\x02"}, + {"encoding/base64", "\xa0\x01ZA\x02"}, + {"encoding/binary", "t\x86\x01\f(\r\x05"}, + {"encoding/csv", "\x02\x01q\x03\x83\x01D\x13\x02"}, + {"encoding/gob", "\x02f\x05\a\x03g\x1c\v\x01\x03\x1d\b\x12\x01\x10\x02"}, + {"encoding/hex", "t\x03\x83\x01A\x03"}, + {"encoding/json", "\x03\x01d\x04\b\x03\x83\x01\f(\r\x02\x01\x02\x11\x01\x01\x02"}, + {"encoding/pem", "\x03i\b\x86\x01A\x03"}, + {"encoding/xml", "\x02\x01e\f\x03\x83\x014\x05\n\x01\x02\x11\x02"}, + {"errors", "\xd0\x01\x85\x01"}, + {"expvar", "qLA\b\v\x15\r\b\x02\x03\x01\x12"}, + {"flag", "h\f\x03\x83\x01,\b\x05\b\x02\x01\x11"}, + {"fmt", "tF'\x19\f \b\r\x02\x03\x13"}, + {"go/ast", "\x03\x01s\x0f\x01s\x03)\b\r\x02\x01\x13\x02"}, + {"go/build", "\x02\x01q\x03\x01\x02\x02\b\x02\x01\x17\x1f\x04\x02\b\x1c\x13\x01+\x01\x04\x01\a\b\x02\x01\x13\x02\x02"}, + {"go/build/constraint", "t\xc9\x01\x01\x13\x02"}, + {"go/constant", "w\x10\x7f\x01\x024\x01\x02\x13"}, + {"go/doc", "\x04s\x01\x05\n=61\x10\x02\x01\x13\x02"}, + {"go/doc/comment", "\x03t\xc4\x01\x01\x01\x01\x13\x02"}, + {"go/format", "\x03t\x01\f\x01\x02sD"}, + {"go/importer", "y\a\x01\x02\x04\x01r9"}, + {"go/internal/gccgoimporter", "\x02\x01^\x13\x03\x04\f\x01p\x02,\x01\x05\x11\x01\r\b"}, + {"go/internal/gcimporter", "\x02u\x10\x010\x05\r0,\x15\x03\x02"}, + {"go/internal/scannerhooks", "\x87\x01"}, + {"go/internal/srcimporter", "w\x01\x01\v\x03\x01r,\x01\x05\x12\x02\x15"}, + {"go/parser", "\x03q\x03\x01\x02\b\x04\x01s\x01+\x06\x12"}, + {"go/printer", "w\x01\x02\x03\ns\f \x15\x02\x01\x02\f\x05\x02"}, + {"go/scanner", "\x03t\v\x05s2\x10\x01\x14\x02"}, + {"go/token", "\x04s\x86\x01>\x02\x03\x01\x10\x02"}, + {"go/types", "\x03\x01\x06j\x03\x01\x03\t\x03\x024\x063\x04\x03\t \x06\a\b\x01\x01\x01\x02\x01\x10\x02\x02"}, + {"go/version", "\xc2\x01|"}, + {"hash", "\xfa\x01"}, + {"hash/adler32", "t\x16\x16"}, + {"hash/crc32", "t\x16\x16\x15\x8b\x01\x01\x14"}, + {"hash/crc64", "t\x16\x16\xa0\x01"}, + {"hash/fnv", "t\x16\x16i"}, + {"hash/maphash", "\x8a\x01\x11<~"}, + {"html", "\xbe\x02\x02\x13"}, + {"html/template", "\x03n\x06\x19-=\x01\n!\x05\x01\x02\x03\f\x01\x02\r\x01\x03\x02"}, + {"image", "\x02r\x1fg\x0f4\x03\x01"}, {"image/color", ""}, - {"image/color/palette", "\x92\x01"}, - {"image/draw", "\x91\x01\x01\x04"}, - {"image/gif", "\x02\x01\x05k\x03\x1b\x01\x01\x01\vZ\x0f"}, - {"image/internal/imageutil", "\x91\x01"}, - {"image/jpeg", "\x02q\x1e\x01\x04c"}, - {"image/png", "\x02\ac\n\x13\x02\x06\x01gC"}, - {"index/suffixarray", "\x03i\a\x86\x01\f+\n\x01"}, - {"internal/abi", "\xbb\x01\x98\x01"}, - {"internal/asan", "\xd3\x02"}, - {"internal/bisect", "\xb2\x02\r\x01"}, - {"internal/buildcfg", "vHg\x06\x02\x05\n\x01"}, - {"internal/bytealg", "\xb4\x01\x9f\x01"}, + {"image/color/palette", "\x93\x01"}, + {"image/draw", "\x92\x01\x01\x04"}, + {"image/gif", "\x02\x01\x05l\x03\x1b\x01\x01\x01\vZ\x0f"}, + {"image/internal/imageutil", "\x92\x01"}, + {"image/jpeg", "\x02r\x1e\x01\x04c"}, + {"image/png", "\x02\ad\n\x13\x02\x06\x01gC"}, + {"index/suffixarray", "\x03j\a\x86\x01\f+\n\x01"}, + {"internal/abi", "\xbc\x01\x99\x01"}, + {"internal/asan", "\xd5\x02"}, + {"internal/bisect", "\xb3\x02\r\x01"}, + {"internal/buildcfg", "wHg\x06\x02\x05\n\x01"}, + {"internal/bytealg", "\xb5\x01\xa0\x01"}, {"internal/byteorder", ""}, {"internal/cfg", ""}, - {"internal/cgrouptest", "v[T\x06\x0f\x02\x01\x04\x01"}, - {"internal/chacha8rand", "\x9f\x01\x15\a\x98\x01"}, + {"internal/cgrouptest", "w[T\x06\x0f\x02\x01\x04\x01"}, + {"internal/chacha8rand", "\xa0\x01\x15\a\x99\x01"}, {"internal/copyright", ""}, {"internal/coverage", ""}, {"internal/coverage/calloc", ""}, - {"internal/coverage/cfile", "p\x06\x17\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01\"\x02',\x06\a\n\x01\x03\r\x06"}, - {"internal/coverage/cformat", "\x04r.\x04Q\v6\x01\x02\r"}, - {"internal/coverage/cmerge", "v.a"}, - {"internal/coverage/decodecounter", "l\n.\v\x02H,\x17\x17"}, - {"internal/coverage/decodemeta", "\x02j\n\x17\x17\v\x02H,"}, - {"internal/coverage/encodecounter", "\x02j\n.\f\x01\x02F\v!\x15"}, - {"internal/coverage/encodemeta", "\x02\x01i\n\x13\x04\x17\r\x02F,."}, - {"internal/coverage/pods", "\x04r.\x81\x01\x06\x05\n\x02\x01"}, - {"internal/coverage/rtcov", "\xd3\x02"}, - {"internal/coverage/slicereader", "l\n\x83\x01Z"}, - {"internal/coverage/slicewriter", "v\x83\x01"}, - {"internal/coverage/stringtab", "v9\x04F"}, + {"internal/coverage/cfile", "q\x06\x17\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01\"\x02',\x06\a\n\x01\x03\x0e\x06"}, + {"internal/coverage/cformat", "\x04s.\x04Q\v6\x01\x02\x0e"}, + {"internal/coverage/cmerge", "w.a"}, + {"internal/coverage/decodecounter", "m\n.\v\x02H,\x17\x18"}, + {"internal/coverage/decodemeta", "\x02k\n\x17\x17\v\x02H,"}, + {"internal/coverage/encodecounter", "\x02k\n.\f\x01\x02F\v!\x15"}, + {"internal/coverage/encodemeta", "\x02\x01j\n\x13\x04\x17\r\x02F,/"}, + {"internal/coverage/pods", "\x04s.\x81\x01\x06\x05\n\x02\x01"}, + {"internal/coverage/rtcov", "\xd5\x02"}, + {"internal/coverage/slicereader", "m\n\x83\x01["}, + {"internal/coverage/slicewriter", "w\x83\x01"}, + {"internal/coverage/stringtab", "w9\x04F"}, {"internal/coverage/test", ""}, {"internal/coverage/uleb128", ""}, - {"internal/cpu", "\xd3\x02"}, - {"internal/dag", "\x04r\xc4\x01\x03"}, - {"internal/diff", "\x03s\xc5\x01\x02"}, - {"internal/exportdata", "\x02\x01p\x03\x02e\x1c,\x01\x05\x11\x01\x02"}, - {"internal/filepathlite", "s+B\x1a@"}, - {"internal/fmtsort", "\x04\xa9\x02\r"}, - {"internal/fuzz", "\x03\nG\x18\x04\x03\x03\x01\f\x036=\f\x03\x1d\x01\x05\x02\x05\n\x01\x02\x01\x01\f\x04\x02"}, + {"internal/cpu", "\xd5\x02"}, + {"internal/dag", "\x04s\xc4\x01\x03"}, + {"internal/diff", "\x03t\xc5\x01\x02"}, + {"internal/exportdata", "\x02\x01q\x03\x02e\x1c,\x01\x05\x11\x01\x02"}, + {"internal/filepathlite", "t+B\x1a@"}, + {"internal/fmtsort", "\x04\xaa\x02\r"}, + {"internal/fuzz", "\x03\nH\x18\x04\x03\x03\x01\f\x036=\f\x03\x1d\x01\x05\x02\x05\n\x01\x02\x01\x01\r\x04\x02"}, {"internal/goarch", ""}, - {"internal/godebug", "\x9c\x01!\x82\x01\x01\x13"}, + {"internal/godebug", "\x9d\x01!\x82\x01\x01\x14"}, {"internal/godebugs", ""}, {"internal/goexperiment", ""}, {"internal/goos", ""}, - {"internal/goroot", "\xa5\x02\x01\x05\x12\x02"}, + {"internal/goroot", "\xa6\x02\x01\x05\x12\x02"}, {"internal/gover", "\x04"}, {"internal/goversion", ""}, - {"internal/lazyregexp", "\xa5\x02\v\r\x02"}, - {"internal/lazytemplate", "\xf9\x01,\x18\x02\f"}, - {"internal/msan", "\xd3\x02"}, + {"internal/lazyregexp", "\xa6\x02\v\r\x02"}, + {"internal/lazytemplate", "\xfa\x01,\x18\x02\r"}, + {"internal/msan", "\xd5\x02"}, {"internal/nettrace", ""}, - {"internal/obscuretestdata", "k\x8e\x01,"}, - {"internal/oserror", "s"}, - {"internal/pkgbits", "\x03Q\x18\a\x03\x04\fs\r\x1f\r\n\x01"}, + {"internal/obscuretestdata", "l\x8e\x01,"}, + {"internal/oserror", "t"}, + {"internal/pkgbits", "\x03R\x18\a\x03\x04\fs\r\x1f\r\n\x01"}, {"internal/platform", ""}, - {"internal/poll", "sl\x05\x159\r\x01\x01\f\x06"}, - {"internal/profile", "\x03\x04l\x03\x83\x017\n\x01\x01\x01\x10"}, + {"internal/poll", "tl\x05\x159\r\x01\x01\r\x06"}, + {"internal/profile", "\x03\x04m\x03\x83\x017\n\x01\x01\x01\x11"}, {"internal/profilerecord", ""}, - {"internal/race", "\x9a\x01\xb9\x01"}, - {"internal/reflectlite", "\x9a\x01!;\x16"}, - {"vendor/golang.org/x/text/unicode/norm", "l\n\x83\x01F\x12\x11"}, - {"weak", "\x9a\x01\x98\x01!"}, + {"vendor/golang.org/x/crypto/internal/alias", "\xd5\x02"}, + {"vendor/golang.org/x/crypto/internal/poly1305", "X\x15\x9c\x01"}, + {"vendor/golang.org/x/net/dns/dnsmessage", "t\xc7\x01"}, + {"vendor/golang.org/x/net/http/httpguts", "\x90\x02\x14\x1a\x15\r"}, + {"vendor/golang.org/x/net/http/httpproxy", "t\x03\x99\x01\x10\x05\x01\x18\x15\r"}, + {"vendor/golang.org/x/net/http2/hpack", "\x03q\x03\x83\x01F"}, + {"vendor/golang.org/x/net/idna", "w\x8f\x018\x15\x10\x02\x01"}, + {"vendor/golang.org/x/net/nettest", "\x03j\a\x03\x83\x01\x11\x05\x16\x01\f\n\x01\x02\x02\x01\f"}, + {"vendor/golang.org/x/sys/cpu", "\xa6\x02\r\n\x01\x17"}, + {"vendor/golang.org/x/text/secure/bidirule", "t\xdf\x01\x11\x01"}, + {"vendor/golang.org/x/text/transform", "\x03q\x86\x01Y"}, + {"vendor/golang.org/x/text/unicode/bidi", "\x03\bl\x87\x01>\x17"}, + {"vendor/golang.org/x/text/unicode/norm", "m\n\x83\x01F\x13\x11"}, + {"weak", "\x9b\x01\x98\x01\""}, } // bootstrap is the list of bootstrap packages extracted from cmd/dist. diff --git a/tools/vendor/golang.org/x/tools/internal/stdlib/manifest.go b/tools/vendor/golang.org/x/tools/internal/stdlib/manifest.go index f1e24625a..33e4f505f 100644 --- a/tools/vendor/golang.org/x/tools/internal/stdlib/manifest.go +++ b/tools/vendor/golang.org/x/tools/internal/stdlib/manifest.go @@ -626,7 +626,7 @@ var PackageSymbols = map[string][]Symbol{ {"PublicKey", Type, 0, ""}, {"PublicKey.Parameters", Field, 0, ""}, {"PublicKey.Y", Field, 0, ""}, - {"Sign", Func, 0, "func(rand io.Reader, priv *PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)"}, + {"Sign", Func, 0, "func(random io.Reader, priv *PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)"}, {"Verify", Func, 0, "func(pub *PublicKey, hash []byte, r *big.Int, s *big.Int) bool"}, }, "crypto/ecdh": { @@ -674,7 +674,7 @@ var PackageSymbols = map[string][]Symbol{ {"(PublicKey).Params", Method, 0, ""}, {"(PublicKey).ScalarBaseMult", Method, 0, ""}, {"(PublicKey).ScalarMult", Method, 0, ""}, - {"GenerateKey", Func, 0, "func(c elliptic.Curve, rand io.Reader) (*PrivateKey, error)"}, + {"GenerateKey", Func, 0, "func(c elliptic.Curve, r io.Reader) (*PrivateKey, error)"}, {"ParseRawPrivateKey", Func, 25, "func(curve elliptic.Curve, data []byte) (*PrivateKey, error)"}, {"ParseUncompressedPublicKey", Func, 25, "func(curve elliptic.Curve, data []byte) (*PublicKey, error)"}, {"PrivateKey", Type, 0, ""}, @@ -685,7 +685,7 @@ var PackageSymbols = map[string][]Symbol{ {"PublicKey.X", Field, 0, ""}, {"PublicKey.Y", Field, 0, ""}, {"Sign", Func, 0, "func(rand io.Reader, priv *PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)"}, - {"SignASN1", Func, 15, "func(rand io.Reader, priv *PrivateKey, hash []byte) ([]byte, error)"}, + {"SignASN1", Func, 15, "func(r io.Reader, priv *PrivateKey, hash []byte) ([]byte, error)"}, {"Verify", Func, 0, "func(pub *PublicKey, hash []byte, r *big.Int, s *big.Int) bool"}, {"VerifyASN1", Func, 15, "func(pub *PublicKey, hash []byte, sig []byte) bool"}, }, @@ -696,7 +696,7 @@ var PackageSymbols = map[string][]Symbol{ {"(PrivateKey).Seed", Method, 13, ""}, {"(PrivateKey).Sign", Method, 13, ""}, {"(PublicKey).Equal", Method, 15, ""}, - {"GenerateKey", Func, 13, "func(rand io.Reader) (PublicKey, PrivateKey, error)"}, + {"GenerateKey", Func, 13, "func(random io.Reader) (PublicKey, PrivateKey, error)"}, {"NewKeyFromSeed", Func, 13, "func(seed []byte) PrivateKey"}, {"Options", Type, 20, ""}, {"Options.Context", Field, 20, ""}, @@ -745,7 +745,9 @@ var PackageSymbols = map[string][]Symbol{ }, "crypto/fips140": { {"Enabled", Func, 24, "func() bool"}, + {"Enforced", Func, 26, "func() bool"}, {"Version", Func, 26, "func() string"}, + {"WithoutEnforcement", Func, 26, "func(f func())"}, }, "crypto/hkdf": { {"Expand", Func, 24, "func[H hash.Hash](h func() H, pseudorandomKey []byte, info string, keyLength int) ([]byte, error)"}, @@ -756,6 +758,54 @@ var PackageSymbols = map[string][]Symbol{ {"Equal", Func, 1, "func(mac1 []byte, mac2 []byte) bool"}, {"New", Func, 0, "func(h func() hash.Hash, key []byte) hash.Hash"}, }, + "crypto/hpke": { + {"(*Recipient).Export", Method, 26, ""}, + {"(*Recipient).Open", Method, 26, ""}, + {"(*Sender).Export", Method, 26, ""}, + {"(*Sender).Seal", Method, 26, ""}, + {"(AEAD).ID", Method, 26, ""}, + {"(KDF).ID", Method, 26, ""}, + {"(KEM).DeriveKeyPair", Method, 26, ""}, + {"(KEM).GenerateKey", Method, 26, ""}, + {"(KEM).ID", Method, 26, ""}, + {"(KEM).NewPrivateKey", Method, 26, ""}, + {"(KEM).NewPublicKey", Method, 26, ""}, + {"(PrivateKey).Bytes", Method, 26, ""}, + {"(PrivateKey).KEM", Method, 26, ""}, + {"(PrivateKey).PublicKey", Method, 26, ""}, + {"(PublicKey).Bytes", Method, 26, ""}, + {"(PublicKey).KEM", Method, 26, ""}, + {"AES128GCM", Func, 26, "func() AEAD"}, + {"AES256GCM", Func, 26, "func() AEAD"}, + {"ChaCha20Poly1305", Func, 26, "func() AEAD"}, + {"DHKEM", Func, 26, "func(curve ecdh.Curve) KEM"}, + {"ExportOnly", Func, 26, "func() AEAD"}, + {"HKDFSHA256", Func, 26, "func() KDF"}, + {"HKDFSHA384", Func, 26, "func() KDF"}, + {"HKDFSHA512", Func, 26, "func() KDF"}, + {"MLKEM1024", Func, 26, "func() KEM"}, + {"MLKEM1024P384", Func, 26, "func() KEM"}, + {"MLKEM768", Func, 26, "func() KEM"}, + {"MLKEM768P256", Func, 26, "func() KEM"}, + {"MLKEM768X25519", Func, 26, "func() KEM"}, + {"NewAEAD", Func, 26, "func(id uint16) (AEAD, error)"}, + {"NewDHKEMPrivateKey", Func, 26, "func(priv ecdh.KeyExchanger) (PrivateKey, error)"}, + {"NewDHKEMPublicKey", Func, 26, "func(pub *ecdh.PublicKey) (PublicKey, error)"}, + {"NewHybridPrivateKey", Func, 26, "func(pq crypto.Decapsulator, t ecdh.KeyExchanger) (PrivateKey, error)"}, + {"NewHybridPublicKey", Func, 26, "func(pq crypto.Encapsulator, t *ecdh.PublicKey) (PublicKey, error)"}, + {"NewKDF", Func, 26, "func(id uint16) (KDF, error)"}, + {"NewKEM", Func, 26, "func(id uint16) (KEM, error)"}, + {"NewMLKEMPrivateKey", Func, 26, "func(priv crypto.Decapsulator) (PrivateKey, error)"}, + {"NewMLKEMPublicKey", Func, 26, "func(pub crypto.Encapsulator) (PublicKey, error)"}, + {"NewRecipient", Func, 26, "func(enc []byte, k PrivateKey, kdf KDF, aead AEAD, info []byte) (*Recipient, error)"}, + {"NewSender", Func, 26, "func(pk PublicKey, kdf KDF, aead AEAD, info []byte) (enc []byte, s *Sender, err error)"}, + {"Open", Func, 26, "func(k PrivateKey, kdf KDF, aead AEAD, info []byte, ciphertext []byte) ([]byte, error)"}, + {"Recipient", Type, 26, ""}, + {"SHAKE128", Func, 26, "func() KDF"}, + {"SHAKE256", Func, 26, "func() KDF"}, + {"Seal", Func, 26, "func(pk PublicKey, kdf KDF, aead AEAD, info []byte, plaintext []byte) ([]byte, error)"}, + {"Sender", Type, 26, ""}, + }, "crypto/md5": { {"BlockSize", Const, 0, ""}, {"New", Func, 0, "func() hash.Hash"}, @@ -801,7 +851,7 @@ var PackageSymbols = map[string][]Symbol{ }, "crypto/rand": { {"Int", Func, 0, "func(rand io.Reader, max *big.Int) (n *big.Int, err error)"}, - {"Prime", Func, 0, "func(rand io.Reader, bits int) (*big.Int, error)"}, + {"Prime", Func, 0, "func(r io.Reader, bits int) (*big.Int, error)"}, {"Read", Func, 0, "func(b []byte) (n int, err error)"}, {"Reader", Var, 0, ""}, {"Text", Func, 24, "func() string"}, @@ -865,7 +915,7 @@ var PackageSymbols = map[string][]Symbol{ {"PublicKey.E", Field, 0, ""}, {"PublicKey.N", Field, 0, ""}, {"SignPKCS1v15", Func, 0, "func(random io.Reader, priv *PrivateKey, hash crypto.Hash, hashed []byte) ([]byte, error)"}, - {"SignPSS", Func, 2, "func(rand io.Reader, priv *PrivateKey, hash crypto.Hash, digest []byte, opts *PSSOptions) ([]byte, error)"}, + {"SignPSS", Func, 2, "func(random io.Reader, priv *PrivateKey, hash crypto.Hash, digest []byte, opts *PSSOptions) ([]byte, error)"}, {"VerifyPKCS1v15", Func, 0, "func(pub *PublicKey, hash crypto.Hash, hashed []byte, sig []byte) error"}, {"VerifyPSS", Func, 2, "func(pub *PublicKey, hash crypto.Hash, digest []byte, sig []byte, opts *PSSOptions) error"}, }, @@ -1158,6 +1208,8 @@ var PackageSymbols = map[string][]Symbol{ {"RequestClientCert", Const, 0, ""}, {"RequireAndVerifyClientCert", Const, 0, ""}, {"RequireAnyClientCert", Const, 0, ""}, + {"SecP256r1MLKEM768", Const, 26, ""}, + {"SecP384r1MLKEM1024", Const, 26, ""}, {"Server", Func, 0, "func(conn net.Conn, config *Config) *Conn"}, {"SessionState", Type, 21, ""}, {"SessionState.EarlyData", Field, 21, ""}, @@ -1222,6 +1274,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*RevocationList).CheckSignatureFrom", Method, 19, ""}, {"(CertificateInvalidError).Error", Method, 0, ""}, {"(ConstraintViolationError).Error", Method, 0, ""}, + {"(ExtKeyUsage).OID", Method, 26, ""}, {"(ExtKeyUsage).String", Method, 26, ""}, {"(HostnameError).Error", Method, 0, ""}, {"(InsecureAlgorithmError).Error", Method, 6, ""}, @@ -1380,6 +1433,7 @@ var PackageSymbols = map[string][]Symbol{ {"NoValidChains", Const, 24, ""}, {"NotAuthorizedToSign", Const, 0, ""}, {"OID", Type, 22, ""}, + {"OIDFromASN1OID", Func, 26, "func(asn1OID asn1.ObjectIdentifier) (OID, error)"}, {"OIDFromInts", Func, 22, "func(oid []uint64) (OID, error)"}, {"PEMCipher", Type, 1, ""}, {"PEMCipher3DES", Const, 1, ""}, @@ -1690,10 +1744,6 @@ var PackageSymbols = map[string][]Symbol{ {"(Rows).Next", Method, 0, ""}, {"(RowsAffected).LastInsertId", Method, 0, ""}, {"(RowsAffected).RowsAffected", Method, 0, ""}, - {"(RowsColumnScanner).Close", Method, 26, ""}, - {"(RowsColumnScanner).Columns", Method, 26, ""}, - {"(RowsColumnScanner).Next", Method, 26, ""}, - {"(RowsColumnScanner).ScanColumn", Method, 26, ""}, {"(RowsColumnTypeDatabaseTypeName).Close", Method, 8, ""}, {"(RowsColumnTypeDatabaseTypeName).ColumnTypeDatabaseTypeName", Method, 8, ""}, {"(RowsColumnTypeDatabaseTypeName).Columns", Method, 8, ""}, @@ -1765,7 +1815,6 @@ var PackageSymbols = map[string][]Symbol{ {"ResultNoRows", Var, 0, ""}, {"Rows", Type, 0, ""}, {"RowsAffected", Type, 0, ""}, - {"RowsColumnScanner", Type, 26, ""}, {"RowsColumnTypeDatabaseTypeName", Type, 8, ""}, {"RowsColumnTypeLength", Type, 8, ""}, {"RowsColumnTypeNullable", Type, 8, ""}, @@ -17367,6 +17416,9 @@ var PackageSymbols = map[string][]Symbol{ {"Testing", Func, 21, "func() bool"}, {"Verbose", Func, 1, "func() bool"}, }, + "testing/cryptotest": { + {"SetGlobalRandom", Func, 26, "func(t *testing.T, seed uint64)"}, + }, "testing/fstest": { {"(MapFS).Glob", Method, 16, ""}, {"(MapFS).Lstat", Method, 25, ""}, diff --git a/tools/vendor/modules.txt b/tools/vendor/modules.txt index 2193de19b..f86db6e73 100644 --- a/tools/vendor/modules.txt +++ b/tools/vendor/modules.txt @@ -57,7 +57,7 @@ github.com/Djarvur/go-err113 # github.com/Masterminds/semver/v3 v3.4.0 ## explicit; go 1.21 github.com/Masterminds/semver/v3 -# github.com/MirrexOne/unqueryvet v1.4.0 +# github.com/MirrexOne/unqueryvet v1.5.1 ## explicit; go 1.24.0 github.com/MirrexOne/unqueryvet github.com/MirrexOne/unqueryvet/internal/analyzer @@ -67,7 +67,7 @@ github.com/MirrexOne/unqueryvet/pkg/config ## explicit; go 1.23.0 github.com/OpenPeeDeeP/depguard/v2 github.com/OpenPeeDeeP/depguard/v2/internal/utils -# github.com/alecthomas/chroma/v2 v2.21.1 +# github.com/alecthomas/chroma/v2 v2.23.0 ## explicit; go 1.22 github.com/alecthomas/chroma/v2 github.com/alecthomas/chroma/v2/formatters @@ -266,7 +266,7 @@ github.com/go-toolsmith/strparse # github.com/go-toolsmith/typep v1.1.0 ## explicit; go 1.16 github.com/go-toolsmith/typep -# github.com/go-viper/mapstructure/v2 v2.4.0 +# github.com/go-viper/mapstructure/v2 v2.5.0 ## explicit; go 1.18 github.com/go-viper/mapstructure/v2 github.com/go-viper/mapstructure/v2/internal/errors @@ -949,10 +949,10 @@ go.yaml.in/yaml/v2 # go.yaml.in/yaml/v3 v3.0.4 ## explicit; go 1.16 go.yaml.in/yaml/v3 -# golang.org/x/exp/typeparams v0.0.0-20251219203646-944ab1f22d93 +# golang.org/x/exp/typeparams v0.0.0-20260112195511-716be5621a96 ## explicit; go 1.24.0 golang.org/x/exp/typeparams -# golang.org/x/mod v0.31.0 +# golang.org/x/mod v0.32.0 ## explicit; go 1.24.0 golang.org/x/mod/internal/lazyregexp golang.org/x/mod/modfile @@ -967,7 +967,7 @@ golang.org/x/sync/semaphore ## explicit; go 1.24.0 golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/text v0.32.0 +# golang.org/x/text v0.33.0 ## explicit; go 1.24.0 golang.org/x/text/encoding golang.org/x/text/encoding/internal @@ -990,7 +990,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.40.0 +# golang.org/x/tools v0.41.0 ## explicit; go 1.24.0 golang.org/x/tools/go/analysis golang.org/x/tools/go/analysis/passes/appends @@ -1017,7 +1017,6 @@ golang.org/x/tools/go/analysis/passes/httpmux golang.org/x/tools/go/analysis/passes/httpresponse golang.org/x/tools/go/analysis/passes/ifaceassert golang.org/x/tools/go/analysis/passes/inspect -golang.org/x/tools/go/analysis/passes/internal/ctrlflowinternal golang.org/x/tools/go/analysis/passes/loopclosure golang.org/x/tools/go/analysis/passes/lostcancel golang.org/x/tools/go/analysis/passes/modernize @@ -1062,7 +1061,6 @@ golang.org/x/tools/internal/aliases golang.org/x/tools/internal/analysis/analyzerutil golang.org/x/tools/internal/analysis/typeindex golang.org/x/tools/internal/astutil -golang.org/x/tools/internal/cfginternal golang.org/x/tools/internal/event golang.org/x/tools/internal/event/core golang.org/x/tools/internal/event/keys @@ -1079,7 +1077,6 @@ golang.org/x/tools/internal/packagepath golang.org/x/tools/internal/packagesinternal golang.org/x/tools/internal/pkgbits golang.org/x/tools/internal/refactor -golang.org/x/tools/internal/ssainternal golang.org/x/tools/internal/stdlib golang.org/x/tools/internal/typeparams golang.org/x/tools/internal/typesinternal diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md index 47d2b85fa..fa477145f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md @@ -1,5 +1,16 @@ # Release History +## 1.21.0 (2026-01-12) + +### Features Added + +* Added `runtime/datetime` package which provides specialized time type wrappers for serializing and deserializing +time values in various formats used by Azure services. + +### Other Changes + +* Aligned `cloud.AzureGovernment` and `cloud.AzureChina` audience values with Azure CLI + ## 1.20.0 (2025-11-06) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/client.go index c373cc43f..d103de88a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/doc.go index 1bdd16a3d..370754179 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright 2017 Microsoft Corporation. All rights reserved. // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go index 8a40ebe4d..c602e77d1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_type.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_type.go index ca03ac971..34d09b6d7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_type.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_type.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/policy/policy.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/policy/policy.go index f18caf848..787c8e503 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/policy/policy.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/policy/policy.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_identifier.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_identifier.go index d1c3191f2..7f7b0f141 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_identifier.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_identifier.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_type.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_type.go index fc7fbffd2..270d495e4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_type.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_type.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/pipeline.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/pipeline.go index 6a7c916b4..fa0f29206 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/pipeline.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/pipeline.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_register_rp.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_register_rp.go index 810ac9d9f..3bfb7d02d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_register_rp.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_register_rp.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_trace_namespace.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_trace_namespace.go index 6cea18424..cc84d542d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_trace_namespace.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_trace_namespace.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/runtime.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/runtime.go index 1400d4379..0b58f542e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/runtime.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/runtime.go @@ -1,6 +1,3 @@ -//go:build go1.16 -// +build go1.16 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -10,11 +7,11 @@ import "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" func init() { cloud.AzureChina.Services[cloud.ResourceManager] = cloud.ServiceConfiguration{ - Audience: "https://management.core.chinacloudapi.cn", + Audience: "https://management.core.chinacloudapi.cn/", Endpoint: "https://management.chinacloudapi.cn", } cloud.AzureGovernment.Services[cloud.ResourceManager] = cloud.ServiceConfiguration{ - Audience: "https://management.core.usgovcloudapi.net", + Audience: "https://management.core.usgovcloudapi.net/", Endpoint: "https://management.usgovcloudapi.net", } cloud.AzurePublic.Services[cloud.ResourceManager] = cloud.ServiceConfiguration{ diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/cloud.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/cloud.go index 9d077a3e1..4ef739a6c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/cloud.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/cloud.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/doc.go index 985b1bde2..39d0d489e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/doc.go @@ -1,6 +1,3 @@ -//go:build go1.16 -// +build go1.16 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/core.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/core.go index 9d1c2f0c0..c3572985b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/core.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/core.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/doc.go index 654a5f404..4862a9f68 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright 2017 Microsoft Corporation. All rights reserved. // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/errors.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/errors.go index 03cb227d0..66111a403 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/errors.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/errors.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/etag.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/etag.go index 2b19d01f7..4a5d7462d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/etag.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/etag.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go index 612af11ac..96be304eb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/pipeline.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/pipeline.go index e45f831ed..5d9892a05 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/pipeline.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/pipeline.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/request.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/request.go index 9b3f5badb..4bf722630 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/request.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/request.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -115,7 +112,7 @@ func NewRequest(ctx context.Context, httpMethod string, endpoint string) (*Reque if req.URL.Host == "" { return nil, errors.New("no Host in request URL") } - if !(req.URL.Scheme == "http" || req.URL.Scheme == "https") { + if req.URL.Scheme != "http" && req.URL.Scheme != "https" { return nil, fmt.Errorf("unsupported protocol scheme %s", req.URL.Scheme) } // populate values so that the same instance is propagated across policies diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/response_error.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/response_error.go index 8aec256bd..ef0635bb2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/response_error.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/response_error.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/log/log.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/log/log.go index 6fc6d1400..d3e7191f7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/log/log.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/log/log.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/async/async.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/async/async.go index a53462760..fcaf6e168 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/async/async.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/async/async.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -128,10 +125,11 @@ func (p *Poller[T]) Result(ctx context.Context, out *T) error { } var req *exported.Request var err error - if p.Method == http.MethodPatch || p.Method == http.MethodPut { + switch p.Method { + case http.MethodPatch, http.MethodPut: // for PATCH and PUT, the final GET is on the original resource URL req, err = exported.NewRequest(ctx, http.MethodGet, p.OrigURL) - } else if p.Method == http.MethodPost { + case http.MethodPost: if p.FinalState == pollers.FinalStateViaAzureAsyncOp { // no final GET required } else if p.FinalState == pollers.FinalStateViaOriginalURI { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/body/body.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/body/body.go index 8751b0514..8eebebf78 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/body/body.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/body/body.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/fake/fake.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/fake/fake.go index 7f8d11b8b..3284ea709 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/fake/fake.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/fake/fake.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/loc/loc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/loc/loc.go index 048285275..cbd8e5880 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/loc/loc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/loc/loc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/op/op.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/op/op.go index f49633189..a89aed378 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/op/op.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/op/op.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/poller.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/poller.go index 37ed647f4..2f15bc1de 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/poller.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/poller.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/util.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/util.go index 6a7a32e03..de5454319 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/util.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/util.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -165,7 +162,10 @@ func ResultHelper[T any](resp *http.Response, failed bool, jsonPath string, out return nil } - defer resp.Body.Close() + defer func() { + _ = resp.Body.Close() + }() + if !poller.StatusCodeValid(resp) || failed { // the LRO failed. unmarshall the error and update state return azexported.NewResponseError(resp) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go index f15200091..213202e33 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -40,5 +37,5 @@ const ( Module = "azcore" // Version is the semantic version (see http://semver.org) of this module. - Version = "v1.20.0" + Version = "v1.21.0" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/shared.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/shared.go index d3da2c5fd..e82d4f00c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/shared.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/shared.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/doc.go index 2f3901bff..174bbf99b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright 2017 Microsoft Corporation. All rights reserved. // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/log.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/log.go index f260dac36..6880cd9cd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/log.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/log.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/doc.go index fad2579ed..01d788ad2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright 2017 Microsoft Corporation. All rights reserved. // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/policy.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/policy.go index 368a2199e..074d1a600 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/policy.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/policy.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/doc.go index c9cfa438c..2c169da79 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright 2017 Microsoft Corporation. All rights reserved. // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/errors.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/errors.go index c0d56158e..931d6f862 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/errors.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/errors.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pager.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pager.go index edb4a3cd4..743513be4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pager.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pager.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pipeline.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pipeline.go index 6b1f5c083..3d95fe30d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pipeline.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pipeline.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_api_version.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_api_version.go index c3646feb5..21c1430be 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_api_version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_api_version.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_body_download.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_body_download.go index 99dc029f0..08ce2e4b0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_body_download.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_body_download.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_header.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_header.go index c230af0af..fa6d643f1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_header.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_header.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -34,6 +31,7 @@ func httpHeaderPolicy(req *policy.Request) (*http.Response, error) { // WithHTTPHeader adds the specified http.Header to the parent context. // Use this to specify custom HTTP headers at the API-call level. // Any overlapping headers will have their values replaced with the values specified here. +// // Deprecated: use [policy.WithHTTPHeader] instead. func WithHTTPHeader(parent context.Context, header http.Header) context.Context { return policy.WithHTTPHeader(parent, header) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_trace.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_trace.go index f375195c4..ddf9ede01 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_trace.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_trace.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_include_response.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_include_response.go index bb00f6c2f..eaa6c7375 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_include_response.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_include_response.go @@ -1,6 +1,3 @@ -//go:build go1.16 -// +build go1.16 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -29,6 +26,7 @@ func includeResponsePolicy(req *policy.Request) (*http.Response, error) { // WithCaptureResponse applies the HTTP response retrieval annotation to the parent context. // The resp parameter will contain the HTTP response after the request has completed. +// // Deprecated: use [policy.WithCaptureResponse] instead. func WithCaptureResponse(parent context.Context, resp **http.Response) context.Context { return policy.WithCaptureResponse(parent, resp) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_logging.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_logging.go index f048d7fb5..dd59fbc99 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_logging.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_logging.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_request_id.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_request_id.go index 360a7f211..a8f1cbac3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_request_id.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_request_id.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go index 4c3a31fea..696e1d9f4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -117,7 +114,10 @@ func (p *retryPolicy) Do(req *policy.Request) (resp *http.Response, err error) { // wrap the body so we control when it's actually closed. // do this outside the for loop so defers don't accumulate. rwbody = &retryableRequestBody{body: req.Body()} - defer rwbody.realClose() + defer func() { + // TODO: https://github.com/Azure/azure-sdk-for-go/issues/25649 + _ = rwbody.realClose() + }() } try := int32(1) for { @@ -222,6 +222,7 @@ func (p *retryPolicy) Do(req *policy.Request) (resp *http.Response, err error) { // WithRetryOptions adds the specified RetryOptions to the parent context. // Use this to specify custom RetryOptions at the API-call level. +// // Deprecated: use [policy.WithRetryOptions] instead. func WithRetryOptions(parent context.Context, options policy.RetryOptions) context.Context { return policy.WithRetryOptions(parent, options) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_telemetry.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_telemetry.go index 80a903546..2c60e9d23 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_telemetry.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_telemetry.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/poller.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/poller.go index a89ae9b7b..2e172cdd1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/poller.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/poller.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -87,7 +84,10 @@ func NewPoller[T any](resp *http.Response, pl exported.Pipeline, options *NewPol }, nil } - defer resp.Body.Close() + defer func() { + _ = resp.Body.Close() + }() + // this is a back-stop in case the swagger is incorrect (i.e. missing one or more status codes for success). // ideally the codegen should return an error if the initial response failed and not even create a poller. if !poller.StatusCodeValid(resp) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/request.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/request.go index 7d34b7803..df7826b76 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/request.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/request.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/response.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/response.go index 048566e02..e95f8c8ec 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/response.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/response.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -84,8 +81,9 @@ func UnmarshalAsXML(resp *http.Response, v any) error { // Drain reads the response body to completion then closes it. The bytes read are discarded. func Drain(resp *http.Response) { if resp != nil && resp.Body != nil { + // TODO: this might not be necessary when the bodyDownloadPolicy is in play _, _ = io.Copy(io.Discard, resp.Body) - resp.Body.Close() + _ = resp.Body.Close() } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/transport_default_http_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/transport_default_http_client.go index 2124c1d48..928e9bf92 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/transport_default_http_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/transport_default_http_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/doc.go index cadaef3d5..10d041486 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright 2017 Microsoft Corporation. All rights reserved. // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/progress.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/progress.go index 2468540bd..c93824a66 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/progress.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/progress.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/doc.go index faa98c9dc..13263fbc9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright 2017 Microsoft Corporation. All rights reserved. // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/to.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/to.go index e0e4817b9..e434f7795 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/to.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/to.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/constants.go index 80282d4ab..c00c21a3b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/constants.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/tracing.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/tracing.go index 1ade7c560..8f3248560 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/tracing.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/tracing.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/CHANGELOG.md index 2e5238bc4..82fa2c529 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.71.0 (2026-01-15) + +* **Feature**: Adds support for configuring FIPS in AWS GovCloud (US) Regions via a new ECS Capacity Provider field fipsEnabled. When enabled, instances launched by the capacity provider will use a FIPS-140 enabled AMI. Instances will use FIPS-140 compliant cryptographic modules and AWS FIPS endpoints. + # v1.70.1 (2026-01-09) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/deserializers.go index f84a29114..3bf829ca3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/deserializers.go @@ -15134,6 +15134,15 @@ func awsAwsjson11_deserializeDocumentInstanceLaunchTemplate(v **types.InstanceLa sv.Ec2InstanceProfileArn = ptr.String(jtv) } + case "fipsEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value) + } + sv.FipsEnabled = ptr.Bool(jtv) + } + case "instanceRequirements": if err := awsAwsjson11_deserializeDocumentInstanceRequirementsRequest(&sv.InstanceRequirements, value); err != nil { return err diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/go_module_metadata.go index d97d64140..13a5d058a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/go_module_metadata.go @@ -3,4 +3,4 @@ package ecs // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.70.1" +const goModuleVersion = "1.71.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/serializers.go index 99c3ad908..0a39efe90 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/serializers.go @@ -5758,6 +5758,11 @@ func awsAwsjson11_serializeDocumentInstanceLaunchTemplate(v *types.InstanceLaunc ok.String(*v.Ec2InstanceProfileArn) } + if v.FipsEnabled != nil { + ok := object.Key("fipsEnabled") + ok.Boolean(*v.FipsEnabled) + } + if v.InstanceRequirements != nil { ok := object.Key("instanceRequirements") if err := awsAwsjson11_serializeDocumentInstanceRequirementsRequest(v.InstanceRequirements, ok); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/types/types.go index afd0dc8a5..759147ecf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ecs/types/types.go @@ -3390,6 +3390,15 @@ type InstanceLaunchTemplate struct { // [Instance purchasing options]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html CapacityOptionType CapacityOptionType + // Determines whether to enable FIPS 140-2 validated cryptographic modules on EC2 + // instances launched by the capacity provider. If true , instances use + // FIPS-compliant cryptographic algorithms and modules for enhanced security + // compliance. If false , instances use standard cryptographic implementations. + // + // If not specified, instances are launched with FIPS enabled in AWS GovCloud (US) + // regions and FIPS disabled in other regions. + FipsEnabled *bool + // The instance requirements. You can specify: // // - The instance types diff --git a/vendor/github.com/go-viper/mapstructure/v2/.editorconfig b/vendor/github.com/go-viper/mapstructure/v2/.editorconfig index faef0c91e..c37602a02 100644 --- a/vendor/github.com/go-viper/mapstructure/v2/.editorconfig +++ b/vendor/github.com/go-viper/mapstructure/v2/.editorconfig @@ -19,3 +19,6 @@ indent_size = 2 [.golangci.yaml] indent_size = 2 + +[devenv.yaml] +indent_size = 2 diff --git a/vendor/github.com/go-viper/mapstructure/v2/.envrc b/vendor/github.com/go-viper/mapstructure/v2/.envrc index 2e0f9f5f7..e2be8891c 100644 --- a/vendor/github.com/go-viper/mapstructure/v2/.envrc +++ b/vendor/github.com/go-viper/mapstructure/v2/.envrc @@ -1,4 +1,7 @@ -if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4=" -fi -use flake . --impure +#!/usr/bin/env bash + +export DIRENV_WARN_TIMEOUT=20s + +eval "$(devenv direnvrc)" + +use devenv diff --git a/vendor/github.com/go-viper/mapstructure/v2/.gitignore b/vendor/github.com/go-viper/mapstructure/v2/.gitignore index 470e7ca2b..71caea19f 100644 --- a/vendor/github.com/go-viper/mapstructure/v2/.gitignore +++ b/vendor/github.com/go-viper/mapstructure/v2/.gitignore @@ -1,6 +1,10 @@ -/.devenv/ -/.direnv/ -/.pre-commit-config.yaml /bin/ /build/ /var/ + +# Devenv +.devenv* +devenv.local.nix +devenv.local.yaml +.direnv +.pre-commit-config.yaml diff --git a/vendor/github.com/go-viper/mapstructure/v2/devenv.lock b/vendor/github.com/go-viper/mapstructure/v2/devenv.lock new file mode 100644 index 000000000..72c2c9b4d --- /dev/null +++ b/vendor/github.com/go-viper/mapstructure/v2/devenv.lock @@ -0,0 +1,103 @@ +{ + "nodes": { + "devenv": { + "locked": { + "dir": "src/modules", + "lastModified": 1765288076, + "owner": "cachix", + "repo": "devenv", + "rev": "93c055af1e8fcac49251f1b2e1c57f78620ad351", + "type": "github" + }, + "original": { + "dir": "src/modules", + "owner": "cachix", + "repo": "devenv", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1765121682, + "owner": "edolstra", + "repo": "flake-compat", + "rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1765016596, + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "548fc44fca28a5e81c5d6b846e555e6b9c2a5a3c", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1762808025, + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1764580874, + "owner": "cachix", + "repo": "devenv-nixpkgs", + "rev": "dcf61356c3ab25f1362b4a4428a6d871e84f1d1d", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "rolling", + "repo": "devenv-nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "devenv": "devenv", + "git-hooks": "git-hooks", + "nixpkgs": "nixpkgs", + "pre-commit-hooks": [ + "git-hooks" + ] + } + } + }, + "root": "root", + "version": 7 +} diff --git a/vendor/github.com/go-viper/mapstructure/v2/devenv.nix b/vendor/github.com/go-viper/mapstructure/v2/devenv.nix new file mode 100644 index 000000000..b31ab7a1f --- /dev/null +++ b/vendor/github.com/go-viper/mapstructure/v2/devenv.nix @@ -0,0 +1,14 @@ +{ + pkgs, + ... +}: + +{ + languages = { + go.enable = true; + }; + + packages = with pkgs; [ + golangci-lint + ]; +} diff --git a/vendor/github.com/go-viper/mapstructure/v2/devenv.yaml b/vendor/github.com/go-viper/mapstructure/v2/devenv.yaml new file mode 100644 index 000000000..68616a49c --- /dev/null +++ b/vendor/github.com/go-viper/mapstructure/v2/devenv.yaml @@ -0,0 +1,4 @@ +# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json +inputs: + nixpkgs: + url: github:cachix/devenv-nixpkgs/rolling diff --git a/vendor/github.com/go-viper/mapstructure/v2/flake.lock b/vendor/github.com/go-viper/mapstructure/v2/flake.lock deleted file mode 100644 index 5e67bdd6b..000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/flake.lock +++ /dev/null @@ -1,294 +0,0 @@ -{ - "nodes": { - "cachix": { - "inputs": { - "devenv": [ - "devenv" - ], - "flake-compat": [ - "devenv" - ], - "git-hooks": [ - "devenv" - ], - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1742042642, - "narHash": "sha256-D0gP8srrX0qj+wNYNPdtVJsQuFzIng3q43thnHXQ/es=", - "owner": "cachix", - "repo": "cachix", - "rev": "a624d3eaf4b1d225f918de8543ed739f2f574203", - "type": "github" - }, - "original": { - "owner": "cachix", - "ref": "latest", - "repo": "cachix", - "type": "github" - } - }, - "devenv": { - "inputs": { - "cachix": "cachix", - "flake-compat": "flake-compat", - "git-hooks": "git-hooks", - "nix": "nix", - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1744876578, - "narHash": "sha256-8MTBj2REB8t29sIBLpxbR0+AEGJ7f+RkzZPAGsFd40c=", - "owner": "cachix", - "repo": "devenv", - "rev": "7ff7c351bba20d0615be25ecdcbcf79b57b85fe1", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "devenv", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "devenv", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1712014858, - "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "devenv" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "devenv", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "devenv", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "libgit2": { - "flake": false, - "locked": { - "lastModified": 1697646580, - "narHash": "sha256-oX4Z3S9WtJlwvj0uH9HlYcWv+x1hqp8mhXl7HsLu2f0=", - "owner": "libgit2", - "repo": "libgit2", - "rev": "45fd9ed7ae1a9b74b957ef4f337bc3c8b3df01b5", - "type": "github" - }, - "original": { - "owner": "libgit2", - "repo": "libgit2", - "type": "github" - } - }, - "nix": { - "inputs": { - "flake-compat": [ - "devenv" - ], - "flake-parts": "flake-parts", - "libgit2": "libgit2", - "nixpkgs": "nixpkgs_2", - "nixpkgs-23-11": [ - "devenv" - ], - "nixpkgs-regression": [ - "devenv" - ], - "pre-commit-hooks": [ - "devenv" - ] - }, - "locked": { - "lastModified": 1741798497, - "narHash": "sha256-E3j+3MoY8Y96mG1dUIiLFm2tZmNbRvSiyN7CrSKuAVg=", - "owner": "domenkozar", - "repo": "nix", - "rev": "f3f44b2baaf6c4c6e179de8cbb1cc6db031083cd", - "type": "github" - }, - "original": { - "owner": "domenkozar", - "ref": "devenv-2.24", - "repo": "nix", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1733212471, - "narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "55d15ad12a74eb7d4646254e13638ad0c4128776", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1743296961, - "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1717432640, - "narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "88269ab3044128b7c2f4c7d68448b2fb50456870", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1733477122, - "narHash": "sha256-qamMCz5mNpQmgBwc8SB5tVMlD5sbwVIToVZtSxMph9s=", - "owner": "cachix", - "repo": "devenv-nixpkgs", - "rev": "7bd9e84d0452f6d2e63b6e6da29fe73fac951857", - "type": "github" - }, - "original": { - "owner": "cachix", - "ref": "rolling", - "repo": "devenv-nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1744536153, - "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "devenv": "devenv", - "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_4" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/vendor/github.com/go-viper/mapstructure/v2/flake.nix b/vendor/github.com/go-viper/mapstructure/v2/flake.nix deleted file mode 100644 index 3b116f426..000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/flake.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - flake-parts.url = "github:hercules-ci/flake-parts"; - devenv.url = "github:cachix/devenv"; - }; - - outputs = - inputs@{ flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - imports = [ - inputs.devenv.flakeModule - ]; - - systems = [ - "x86_64-linux" - "x86_64-darwin" - "aarch64-darwin" - ]; - - perSystem = - { pkgs, ... }: - rec { - devenv.shells = { - default = { - languages = { - go.enable = true; - }; - - pre-commit.hooks = { - nixpkgs-fmt.enable = true; - }; - - packages = with pkgs; [ - golangci-lint - ]; - - # https://github.com/cachix/devenv/issues/528#issuecomment-1556108767 - containers = pkgs.lib.mkForce { }; - }; - - ci = devenv.shells.default; - }; - }; - }; -} diff --git a/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go b/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go index 7c35bce02..9087fd96c 100644 --- a/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go +++ b/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go @@ -173,6 +173,25 @@ // Public: "I made it through!" // } // +// # Custom Decoding with Unmarshaler +// +// Types can implement the Unmarshaler interface to control their own decoding. The interface +// behaves similarly to how UnmarshalJSON does in the standard library. It can be used as an +// alternative or companion to a DecodeHook. +// +// type TrimmedString string +// +// func (t *TrimmedString) UnmarshalMapstructure(input any) error { +// str, ok := input.(string) +// if !ok { +// return fmt.Errorf("expected string, got %T", input) +// } +// *t = TrimmedString(strings.TrimSpace(str)) +// return nil +// } +// +// See the Unmarshaler interface documentation for more details. +// // # Other Configuration // // mapstructure is highly configurable. See the DecoderConfig struct @@ -218,6 +237,17 @@ type DecodeHookFuncKind func(reflect.Kind, reflect.Kind, any) (any, error) // values. type DecodeHookFuncValue func(from reflect.Value, to reflect.Value) (any, error) +// Unmarshaler is the interface implemented by types that can unmarshal +// themselves. UnmarshalMapstructure receives the input data (potentially +// transformed by DecodeHook) and should populate the receiver with the +// decoded values. +// +// The Unmarshaler interface takes precedence over the default decoding +// logic for any type (structs, slices, maps, primitives, etc.). +type Unmarshaler interface { + UnmarshalMapstructure(any) error +} + // DecoderConfig is the configuration that is used to create a new decoder // and allows customization of various aspects of decoding. type DecoderConfig struct { @@ -281,6 +311,13 @@ type DecoderConfig struct { // } Squash bool + // Deep will map structures in slices instead of copying them + // + // type Parent struct { + // Children []Child `mapstructure:",deep"` + // } + Deep bool + // Metadata is the struct that will contain extra metadata about // the decoding. If this is nil, then no metadata will be tracked. Metadata *Metadata @@ -290,9 +327,15 @@ type DecoderConfig struct { Result any // The tag name that mapstructure reads for field names. This - // defaults to "mapstructure" + // defaults to "mapstructure". Multiple tag names can be specified + // as a comma-separated list (e.g., "yaml,json"), and the first + // matching non-empty tag will be used. TagName string + // RootName specifies the name to use for the root element in error messages. For example: + // '' has unset fields: + RootName string + // The option of the value in the tag that indicates a field should // be squashed. This defaults to "squash". SquashTagOption string @@ -304,11 +347,34 @@ type DecoderConfig struct { // MatchName is the function used to match the map key to the struct // field name or tag. Defaults to `strings.EqualFold`. This can be used // to implement case-sensitive tag values, support snake casing, etc. + // + // MatchName is used as a fallback comparison when the direct key lookup fails. + // See also MapFieldName for transforming field names before lookup. MatchName func(mapKey, fieldName string) bool // DecodeNil, if set to true, will cause the DecodeHook (if present) to run // even if the input is nil. This can be used to provide default values. DecodeNil bool + + // MapFieldName is the function used to convert the struct field name to the map's key name. + // + // This is useful for automatically converting between naming conventions without + // explicitly tagging each field. For example, to convert Go's PascalCase field names + // to snake_case map keys: + // + // MapFieldName: func(s string) string { + // return strcase.ToSnake(s) + // } + // + // When decoding from a map to a struct, the transformed field name is used for + // the initial lookup. If not found, MatchName is used as a fallback comparison. + // Explicit struct tags always take precedence over MapFieldName. + MapFieldName func(string) string + + // DisableUnmarshaler, if set to true, disables the use of the Unmarshaler + // interface. Types implementing Unmarshaler will be decoded using the + // standard struct decoding logic instead. + DisableUnmarshaler bool } // A Decoder takes a raw interface value and turns it into structured @@ -445,6 +511,12 @@ func NewDecoder(config *DecoderConfig) (*Decoder, error) { config.MatchName = strings.EqualFold } + if config.MapFieldName == nil { + config.MapFieldName = func(s string) string { + return s + } + } + result := &Decoder{ config: config, } @@ -458,7 +530,7 @@ func NewDecoder(config *DecoderConfig) (*Decoder, error) { // Decode decodes the given raw interface to the target pointer specified // by the configuration. func (d *Decoder) Decode(input any) error { - err := d.decode("", input, reflect.ValueOf(d.config.Result).Elem()) + err := d.decode(d.config.RootName, input, reflect.ValueOf(d.config.Result).Elem()) // Retain some of the original behavior when multiple errors ocurr var joinedErr interface{ Unwrap() []error } @@ -540,36 +612,50 @@ func (d *Decoder) decode(name string, input any, outVal reflect.Value) error { var err error addMetaKey := true - switch outputKind { - case reflect.Bool: - err = d.decodeBool(name, input, outVal) - case reflect.Interface: - err = d.decodeBasic(name, input, outVal) - case reflect.String: - err = d.decodeString(name, input, outVal) - case reflect.Int: - err = d.decodeInt(name, input, outVal) - case reflect.Uint: - err = d.decodeUint(name, input, outVal) - case reflect.Float32: - err = d.decodeFloat(name, input, outVal) - case reflect.Complex64: - err = d.decodeComplex(name, input, outVal) - case reflect.Struct: - err = d.decodeStruct(name, input, outVal) - case reflect.Map: - err = d.decodeMap(name, input, outVal) - case reflect.Ptr: - addMetaKey, err = d.decodePtr(name, input, outVal) - case reflect.Slice: - err = d.decodeSlice(name, input, outVal) - case reflect.Array: - err = d.decodeArray(name, input, outVal) - case reflect.Func: - err = d.decodeFunc(name, input, outVal) - default: - // If we reached this point then we weren't able to decode it - return newDecodeError(name, fmt.Errorf("unsupported type: %s", outputKind)) + + // Check if the target implements Unmarshaler and use it if not disabled + unmarshaled := false + if !d.config.DisableUnmarshaler { + if unmarshaler, ok := getUnmarshaler(outVal); ok { + if err = unmarshaler.UnmarshalMapstructure(input); err != nil { + err = newDecodeError(name, err) + } + unmarshaled = true + } + } + + if !unmarshaled { + switch outputKind { + case reflect.Bool: + err = d.decodeBool(name, input, outVal) + case reflect.Interface: + err = d.decodeBasic(name, input, outVal) + case reflect.String: + err = d.decodeString(name, input, outVal) + case reflect.Int: + err = d.decodeInt(name, input, outVal) + case reflect.Uint: + err = d.decodeUint(name, input, outVal) + case reflect.Float32: + err = d.decodeFloat(name, input, outVal) + case reflect.Complex64: + err = d.decodeComplex(name, input, outVal) + case reflect.Struct: + err = d.decodeStruct(name, input, outVal) + case reflect.Map: + err = d.decodeMap(name, input, outVal) + case reflect.Ptr: + addMetaKey, err = d.decodePtr(name, input, outVal) + case reflect.Slice: + err = d.decodeSlice(name, input, outVal) + case reflect.Array: + err = d.decodeArray(name, input, outVal) + case reflect.Func: + err = d.decodeFunc(name, input, outVal) + default: + // If we reached this point then we weren't able to decode it + return newDecodeError(name, fmt.Errorf("unsupported type: %s", outputKind)) + } } // If we reached here, then we successfully decoded SOMETHING, so @@ -668,7 +754,7 @@ func (d *Decoder) decodeString(name string, data any, val reflect.Value) error { case reflect.Uint8: var uints []uint8 if dataKind == reflect.Array { - uints = make([]uint8, dataVal.Len(), dataVal.Len()) + uints = make([]uint8, dataVal.Len()) for i := range uints { uints[i] = dataVal.Index(i).Interface().(uint8) } @@ -1060,8 +1146,8 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re ) } - tagValue := f.Tag.Get(d.config.TagName) - keyName := f.Name + tagValue, _ := getTagValue(f, d.config.TagName) + keyName := d.config.MapFieldName(f.Name) if tagValue == "" && d.config.IgnoreUntaggedFields { continue @@ -1070,6 +1156,9 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re // If Squash is set in the config, we squash the field down. squash := d.config.Squash && v.Kind() == reflect.Struct && f.Anonymous + // If Deep is set in the config, set as default value. + deep := d.config.Deep + v = dereferencePtrToStructIfNeeded(v, d.config.TagName) // Determine the name of the key in the map @@ -1078,12 +1167,12 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re continue } // If "omitempty" is specified in the tag, it ignores empty values. - if strings.Index(tagValue[index+1:], "omitempty") != -1 && isEmptyValue(v) { + if strings.Contains(tagValue[index+1:], "omitempty") && isEmptyValue(v) { continue } // If "omitzero" is specified in the tag, it ignores zero values. - if strings.Index(tagValue[index+1:], "omitzero") != -1 && v.IsZero() { + if strings.Contains(tagValue[index+1:], "omitzero") && v.IsZero() { continue } @@ -1103,7 +1192,7 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re ) } } else { - if strings.Index(tagValue[index+1:], "remain") != -1 { + if strings.Contains(tagValue[index+1:], "remain") { if v.Kind() != reflect.Map { return newDecodeError( name+"."+f.Name, @@ -1118,6 +1207,9 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re continue } } + + deep = deep || strings.Contains(tagValue[index+1:], "deep") + if keyNameTagValue := tagValue[:index]; keyNameTagValue != "" { keyName = keyNameTagValue } @@ -1164,6 +1256,41 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re valMap.SetMapIndex(reflect.ValueOf(keyName), vMap) } + case reflect.Slice: + if deep { + var childType reflect.Type + switch v.Type().Elem().Kind() { + case reflect.Struct: + childType = reflect.TypeOf(map[string]any{}) + default: + childType = v.Type().Elem() + } + + sType := reflect.SliceOf(childType) + + addrVal := reflect.New(sType) + + vSlice := reflect.MakeSlice(sType, v.Len(), v.Cap()) + + if v.Len() > 0 { + reflect.Indirect(addrVal).Set(vSlice) + + err := d.decode(keyName, v.Interface(), reflect.Indirect(addrVal)) + if err != nil { + return err + } + } + + vSlice = reflect.Indirect(addrVal) + + valMap.SetMapIndex(reflect.ValueOf(keyName), vSlice) + + break + } + + // When deep mapping is not needed, fallthrough to normal copy + fallthrough + default: valMap.SetMapIndex(reflect.ValueOf(keyName), v) } @@ -1471,7 +1598,10 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e remain := false // We always parse the tags cause we're looking for other tags too - tagParts := strings.Split(fieldType.Tag.Get(d.config.TagName), ",") + tagParts := getTagParts(fieldType, d.config.TagName) + if len(tagParts) == 0 { + tagParts = []string{""} + } for _, tag := range tagParts[1:] { if tag == d.config.SquashTagOption { squash = true @@ -1492,6 +1622,18 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e if !fieldVal.IsNil() { structs = append(structs, fieldVal.Elem().Elem()) } + case reflect.Ptr: + if fieldVal.Type().Elem().Kind() == reflect.Struct { + if fieldVal.IsNil() { + fieldVal.Set(reflect.New(fieldVal.Type().Elem())) + } + structs = append(structs, fieldVal.Elem()) + } else { + errs = append(errs, newDecodeError( + name+"."+fieldType.Name, + fmt.Errorf("unsupported type for squashed pointer: %s", fieldVal.Type().Elem().Kind()), + )) + } default: errs = append(errs, newDecodeError( name+"."+fieldType.Name, @@ -1516,13 +1658,15 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e field, fieldValue := f.field, f.val fieldName := field.Name - tagValue := field.Tag.Get(d.config.TagName) + tagValue, _ := getTagValue(field, d.config.TagName) if tagValue == "" && d.config.IgnoreUntaggedFields { continue } tagValue = strings.SplitN(tagValue, ",", 2)[0] if tagValue != "" { fieldName = tagValue + } else { + fieldName = d.config.MapFieldName(fieldName) } rawMapKey := reflect.ValueOf(fieldName) @@ -1605,8 +1749,14 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e } sort.Strings(keys) + // Improve error message when name is empty by showing the target struct type + // in the case where it is empty for embedded structs. + errorName := name + if errorName == "" { + errorName = val.Type().String() + } errs = append(errs, newDecodeError( - name, + errorName, fmt.Errorf("has invalid keys: %s", strings.Join(keys, ", ")), )) } @@ -1692,7 +1842,7 @@ func isStructTypeConvertibleToMap(typ reflect.Type, checkMapstructureTags bool, if f.PkgPath == "" && !checkMapstructureTags { // check for unexported fields return true } - if checkMapstructureTags && f.Tag.Get(tagName) != "" { // check for mapstructure tags inside + if checkMapstructureTags && hasAnyTag(f, tagName) { // check for mapstructure tags inside return true } } @@ -1700,13 +1850,99 @@ func isStructTypeConvertibleToMap(typ reflect.Type, checkMapstructureTags bool, } func dereferencePtrToStructIfNeeded(v reflect.Value, tagName string) reflect.Value { - if v.Kind() != reflect.Ptr || v.Elem().Kind() != reflect.Struct { + if v.Kind() != reflect.Ptr { + return v + } + + switch v.Elem().Kind() { + case reflect.Slice: + return v.Elem() + + case reflect.Struct: + deref := v.Elem() + derefT := deref.Type() + if isStructTypeConvertibleToMap(derefT, true, tagName) { + return deref + } + return v + + default: return v } - deref := v.Elem() - derefT := deref.Type() - if isStructTypeConvertibleToMap(derefT, true, tagName) { - return deref +} + +func hasAnyTag(field reflect.StructField, tagName string) bool { + _, ok := getTagValue(field, tagName) + return ok +} + +func getTagParts(field reflect.StructField, tagName string) []string { + tagValue, ok := getTagValue(field, tagName) + if !ok { + return nil } - return v + return strings.Split(tagValue, ",") +} + +func getTagValue(field reflect.StructField, tagName string) (string, bool) { + for _, name := range splitTagNames(tagName) { + if tag := field.Tag.Get(name); tag != "" { + return tag, true + } + } + return "", false +} + +func splitTagNames(tagName string) []string { + if tagName == "" { + return []string{"mapstructure"} + } + parts := strings.Split(tagName, ",") + result := make([]string, 0, len(parts)) + + for _, name := range parts { + name = strings.TrimSpace(name) + if name != "" { + result = append(result, name) + } + } + + return result +} + +// unmarshalerType is cached for performance +var unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() + +// getUnmarshaler checks if the value implements Unmarshaler and returns +// the Unmarshaler and a boolean indicating if it was found. It handles both +// pointer and value receivers. +func getUnmarshaler(val reflect.Value) (Unmarshaler, bool) { + // Skip invalid or nil values + if !val.IsValid() { + return nil, false + } + + switch val.Kind() { + case reflect.Pointer, reflect.Interface: + if val.IsNil() { + return nil, false + } + } + + // Check pointer receiver first (most common case) + if val.CanAddr() { + ptrVal := val.Addr() + // Quick check: if no methods, can't implement any interface + if ptrVal.Type().NumMethod() > 0 && ptrVal.Type().Implements(unmarshalerType) { + return ptrVal.Interface().(Unmarshaler), true + } + } + + // Check value receiver + // Quick check: if no methods, can't implement any interface + if val.Type().NumMethod() > 0 && val.CanInterface() && val.Type().Implements(unmarshalerType) { + return val.Interface().(Unmarshaler), true + } + + return nil, false } diff --git a/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal/pulumiUtilities.go b/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal/pulumiUtilities.go index c8bde852d..0daa3b404 100644 --- a/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal/pulumiUtilities.go +++ b/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal/pulumiUtilities.go @@ -165,7 +165,7 @@ func callPlainInner( func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { defaults := []pulumi.ResourceOption{} - version := semver.MustParse("1.47.0") + version := semver.MustParse("1.49.0") 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("1.47.0") + version := semver.MustParse("1.49.0") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } diff --git a/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/pulumi-plugin.json b/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/pulumi-plugin.json index 7b334bfdf..84915aa05 100644 --- a/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/pulumi-plugin.json +++ b/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/pulumi-plugin.json @@ -1,5 +1,5 @@ { "resource": true, "name": "aws-native", - "version": "1.47.0" + "version": "1.49.0" } diff --git a/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/pulumiEnums.go b/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/pulumiEnums.go index 413a2e449..3f55a3c9b 100644 --- a/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/pulumiEnums.go +++ b/vendor/github.com/pulumi/pulumi-aws-native/sdk/go/aws/pulumiEnums.go @@ -63,7 +63,7 @@ const ( RegionEuWest2 = Region("eu-west-2") // Europe (Paris) RegionEuWest3 = Region("eu-west-3") - // EU (Germany) + // AWS European Sovereign Cloud (Germany) RegionEuscDeEast1 = Region("eusc-de-east-1") // Israel (Tel Aviv) RegionIlCentral1 = Region("il-central-1") diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cloudwatch/logSubscriptionFilter.go b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cloudwatch/logSubscriptionFilter.go index e7999ad56..a5e82631e 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cloudwatch/logSubscriptionFilter.go +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cloudwatch/logSubscriptionFilter.go @@ -55,19 +55,23 @@ import ( type LogSubscriptionFilter struct { pulumi.CustomResourceState - // The ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN. + // Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to `false`. Valid only for log groups that have an active log transformer. + ApplyOnTransformedLogs pulumi.BoolOutput `pulumi:"applyOnTransformedLogs"` + // ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN. DestinationArn pulumi.StringOutput `pulumi:"destinationArn"` - // The method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream". + // Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream". Distribution pulumi.StringPtrOutput `pulumi:"distribution"` - // A valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string `""` to match everything. For more information, see the [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). + // List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: `"@aws.account"`, `"@aws.region"`. To remove this argument after it has been set, specify an empty list `[]` explicitly to avoid perpetual differences. + EmitSystemFields pulumi.StringArrayOutput `pulumi:"emitSystemFields"` + // Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string `""` to match everything. For more information, see the [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). FilterPattern pulumi.StringOutput `pulumi:"filterPattern"` - // The name of the log group to associate the subscription filter with + // Name of the log group to associate the subscription filter with. LogGroup pulumi.StringOutput `pulumi:"logGroup"` - // A name for the subscription filter + // Name for the subscription filter. Name pulumi.StringOutput `pulumi:"name"` // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region pulumi.StringOutput `pulumi:"region"` - // The ARN of an IAM role that grants Amazon CloudWatch Logs permissions to deliver ingested log events to the destination. If you use Lambda as a destination, you should skip this argument and use `lambda.Permission` resource for granting access from CloudWatch logs to the destination Lambda function. + // ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use `lambda.Permission` resource for granting access from CloudWatch logs to the destination Lambda function. RoleArn pulumi.StringOutput `pulumi:"roleArn"` } @@ -110,36 +114,44 @@ func GetLogSubscriptionFilter(ctx *pulumi.Context, // Input properties used for looking up and filtering LogSubscriptionFilter resources. type logSubscriptionFilterState struct { - // The ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN. + // Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to `false`. Valid only for log groups that have an active log transformer. + ApplyOnTransformedLogs *bool `pulumi:"applyOnTransformedLogs"` + // ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN. DestinationArn *string `pulumi:"destinationArn"` - // The method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream". + // Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream". Distribution *string `pulumi:"distribution"` - // A valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string `""` to match everything. For more information, see the [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). + // List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: `"@aws.account"`, `"@aws.region"`. To remove this argument after it has been set, specify an empty list `[]` explicitly to avoid perpetual differences. + EmitSystemFields []string `pulumi:"emitSystemFields"` + // Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string `""` to match everything. For more information, see the [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). FilterPattern *string `pulumi:"filterPattern"` - // The name of the log group to associate the subscription filter with + // Name of the log group to associate the subscription filter with. LogGroup interface{} `pulumi:"logGroup"` - // A name for the subscription filter + // Name for the subscription filter. Name *string `pulumi:"name"` // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region *string `pulumi:"region"` - // The ARN of an IAM role that grants Amazon CloudWatch Logs permissions to deliver ingested log events to the destination. If you use Lambda as a destination, you should skip this argument and use `lambda.Permission` resource for granting access from CloudWatch logs to the destination Lambda function. + // ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use `lambda.Permission` resource for granting access from CloudWatch logs to the destination Lambda function. RoleArn *string `pulumi:"roleArn"` } type LogSubscriptionFilterState struct { - // The ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN. + // Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to `false`. Valid only for log groups that have an active log transformer. + ApplyOnTransformedLogs pulumi.BoolPtrInput + // ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN. DestinationArn pulumi.StringPtrInput - // The method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream". + // Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream". Distribution pulumi.StringPtrInput - // A valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string `""` to match everything. For more information, see the [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). + // List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: `"@aws.account"`, `"@aws.region"`. To remove this argument after it has been set, specify an empty list `[]` explicitly to avoid perpetual differences. + EmitSystemFields pulumi.StringArrayInput + // Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string `""` to match everything. For more information, see the [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). FilterPattern pulumi.StringPtrInput - // The name of the log group to associate the subscription filter with + // Name of the log group to associate the subscription filter with. LogGroup pulumi.Input - // A name for the subscription filter + // Name for the subscription filter. Name pulumi.StringPtrInput // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region pulumi.StringPtrInput - // The ARN of an IAM role that grants Amazon CloudWatch Logs permissions to deliver ingested log events to the destination. If you use Lambda as a destination, you should skip this argument and use `lambda.Permission` resource for granting access from CloudWatch logs to the destination Lambda function. + // ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use `lambda.Permission` resource for granting access from CloudWatch logs to the destination Lambda function. RoleArn pulumi.StringPtrInput } @@ -148,37 +160,45 @@ func (LogSubscriptionFilterState) ElementType() reflect.Type { } type logSubscriptionFilterArgs struct { - // The ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN. + // Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to `false`. Valid only for log groups that have an active log transformer. + ApplyOnTransformedLogs *bool `pulumi:"applyOnTransformedLogs"` + // ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN. DestinationArn string `pulumi:"destinationArn"` - // The method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream". + // Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream". Distribution *string `pulumi:"distribution"` - // A valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string `""` to match everything. For more information, see the [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). + // List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: `"@aws.account"`, `"@aws.region"`. To remove this argument after it has been set, specify an empty list `[]` explicitly to avoid perpetual differences. + EmitSystemFields []string `pulumi:"emitSystemFields"` + // Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string `""` to match everything. For more information, see the [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). FilterPattern string `pulumi:"filterPattern"` - // The name of the log group to associate the subscription filter with + // Name of the log group to associate the subscription filter with. LogGroup interface{} `pulumi:"logGroup"` - // A name for the subscription filter + // Name for the subscription filter. Name *string `pulumi:"name"` // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region *string `pulumi:"region"` - // The ARN of an IAM role that grants Amazon CloudWatch Logs permissions to deliver ingested log events to the destination. If you use Lambda as a destination, you should skip this argument and use `lambda.Permission` resource for granting access from CloudWatch logs to the destination Lambda function. + // ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use `lambda.Permission` resource for granting access from CloudWatch logs to the destination Lambda function. RoleArn *string `pulumi:"roleArn"` } // The set of arguments for constructing a LogSubscriptionFilter resource. type LogSubscriptionFilterArgs struct { - // The ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN. + // Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to `false`. Valid only for log groups that have an active log transformer. + ApplyOnTransformedLogs pulumi.BoolPtrInput + // ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN. DestinationArn pulumi.StringInput - // The method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream". + // Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream". Distribution pulumi.StringPtrInput - // A valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string `""` to match everything. For more information, see the [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). + // List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: `"@aws.account"`, `"@aws.region"`. To remove this argument after it has been set, specify an empty list `[]` explicitly to avoid perpetual differences. + EmitSystemFields pulumi.StringArrayInput + // Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string `""` to match everything. For more information, see the [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). FilterPattern pulumi.StringInput - // The name of the log group to associate the subscription filter with + // Name of the log group to associate the subscription filter with. LogGroup pulumi.Input - // A name for the subscription filter + // Name for the subscription filter. Name pulumi.StringPtrInput // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region pulumi.StringPtrInput - // The ARN of an IAM role that grants Amazon CloudWatch Logs permissions to deliver ingested log events to the destination. If you use Lambda as a destination, you should skip this argument and use `lambda.Permission` resource for granting access from CloudWatch logs to the destination Lambda function. + // ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use `lambda.Permission` resource for granting access from CloudWatch logs to the destination Lambda function. RoleArn pulumi.StringPtrInput } @@ -269,27 +289,37 @@ func (o LogSubscriptionFilterOutput) ToLogSubscriptionFilterOutputWithContext(ct return o } -// The ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN. +// Boolean to indicate whether to apply the subscription filter on the transformed version of the log events instead of the original ingested log events. Defaults to `false`. Valid only for log groups that have an active log transformer. +func (o LogSubscriptionFilterOutput) ApplyOnTransformedLogs() pulumi.BoolOutput { + return o.ApplyT(func(v *LogSubscriptionFilter) pulumi.BoolOutput { return v.ApplyOnTransformedLogs }).(pulumi.BoolOutput) +} + +// ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN. func (o LogSubscriptionFilterOutput) DestinationArn() pulumi.StringOutput { return o.ApplyT(func(v *LogSubscriptionFilter) pulumi.StringOutput { return v.DestinationArn }).(pulumi.StringOutput) } -// The method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream". +// Method used to distribute log data to the destination. By default log data is grouped by log stream, but the grouping can be set to random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis stream. Valid values are "Random" and "ByLogStream". func (o LogSubscriptionFilterOutput) Distribution() pulumi.StringPtrOutput { return o.ApplyT(func(v *LogSubscriptionFilter) pulumi.StringPtrOutput { return v.Distribution }).(pulumi.StringPtrOutput) } -// A valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string `""` to match everything. For more information, see the [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). +// List of system fields to include in the log events sent to the subscription destination. These fields provide source information for centralized log data in the forwarded payload. Valid values: `"@aws.account"`, `"@aws.region"`. To remove this argument after it has been set, specify an empty list `[]` explicitly to avoid perpetual differences. +func (o LogSubscriptionFilterOutput) EmitSystemFields() pulumi.StringArrayOutput { + return o.ApplyT(func(v *LogSubscriptionFilter) pulumi.StringArrayOutput { return v.EmitSystemFields }).(pulumi.StringArrayOutput) +} + +// Valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. Use empty string `""` to match everything. For more information, see the [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). func (o LogSubscriptionFilterOutput) FilterPattern() pulumi.StringOutput { return o.ApplyT(func(v *LogSubscriptionFilter) pulumi.StringOutput { return v.FilterPattern }).(pulumi.StringOutput) } -// The name of the log group to associate the subscription filter with +// Name of the log group to associate the subscription filter with. func (o LogSubscriptionFilterOutput) LogGroup() pulumi.StringOutput { return o.ApplyT(func(v *LogSubscriptionFilter) pulumi.StringOutput { return v.LogGroup }).(pulumi.StringOutput) } -// A name for the subscription filter +// Name for the subscription filter. func (o LogSubscriptionFilterOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *LogSubscriptionFilter) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } @@ -299,7 +329,7 @@ func (o LogSubscriptionFilterOutput) Region() pulumi.StringOutput { return o.ApplyT(func(v *LogSubscriptionFilter) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput) } -// The ARN of an IAM role that grants Amazon CloudWatch Logs permissions to deliver ingested log events to the destination. If you use Lambda as a destination, you should skip this argument and use `lambda.Permission` resource for granting access from CloudWatch logs to the destination Lambda function. +// ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery. If you use Lambda as a destination, you should skip this argument and use `lambda.Permission` resource for granting access from CloudWatch logs to the destination Lambda function. func (o LogSubscriptionFilterOutput) RoleArn() pulumi.StringOutput { return o.ApplyT(func(v *LogSubscriptionFilter) pulumi.StringOutput { return v.RoleArn }).(pulumi.StringOutput) } diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2/getVpcEndpoint.go b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2/getVpcEndpoint.go index a6e28de8f..25e459c72 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2/getVpcEndpoint.go +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2/getVpcEndpoint.go @@ -68,11 +68,15 @@ type LookupVpcEndpointArgs struct { Region *string `pulumi:"region"` // Service name of the specific VPC Endpoint to retrieve. For AWS services the service name is usually in the form `com.amazonaws..` (the SageMaker AI Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker..notebook`). ServiceName *string `pulumi:"serviceName"` + // AWS region of the VPC Endpoint Service. Applicable for endpoints of type `Interface`. + ServiceRegion *string `pulumi:"serviceRegion"` // State of the specific VPC Endpoint to retrieve. State *string `pulumi:"state"` // Map of tags, each pair of which must exactly match // a pair on the specific VPC Endpoint to retrieve. Tags map[string]string `pulumi:"tags"` + // VPC Endpoint type. Valid values are `Interface`, `Gateway`, `GatewayLoadBalancer`, `Resource`, and `ServiceNetwork`. + VpcEndpointType *string `pulumi:"vpcEndpointType"` // ID of the VPC in which the specific VPC Endpoint is used. // // The arguments of this data source act as filters for querying the available VPC endpoints. @@ -111,13 +115,13 @@ type LookupVpcEndpointResult struct { // One or more security groups associated with the network interfaces. Applicable for endpoints of type `Interface`. SecurityGroupIds []string `pulumi:"securityGroupIds"` ServiceName string `pulumi:"serviceName"` + ServiceRegion string `pulumi:"serviceRegion"` State string `pulumi:"state"` // One or more subnets in which the VPC Endpoint is located. Applicable for endpoints of type `Interface`. - SubnetIds []string `pulumi:"subnetIds"` - Tags map[string]string `pulumi:"tags"` - // VPC Endpoint type, `Gateway` or `Interface`. - VpcEndpointType string `pulumi:"vpcEndpointType"` - VpcId string `pulumi:"vpcId"` + SubnetIds []string `pulumi:"subnetIds"` + Tags map[string]string `pulumi:"tags"` + VpcEndpointType string `pulumi:"vpcEndpointType"` + VpcId string `pulumi:"vpcId"` } func LookupVpcEndpointOutput(ctx *pulumi.Context, args LookupVpcEndpointOutputArgs, opts ...pulumi.InvokeOption) LookupVpcEndpointResultOutput { @@ -139,11 +143,15 @@ type LookupVpcEndpointOutputArgs struct { Region pulumi.StringPtrInput `pulumi:"region"` // Service name of the specific VPC Endpoint to retrieve. For AWS services the service name is usually in the form `com.amazonaws..` (the SageMaker AI Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker..notebook`). ServiceName pulumi.StringPtrInput `pulumi:"serviceName"` + // AWS region of the VPC Endpoint Service. Applicable for endpoints of type `Interface`. + ServiceRegion pulumi.StringPtrInput `pulumi:"serviceRegion"` // State of the specific VPC Endpoint to retrieve. State pulumi.StringPtrInput `pulumi:"state"` // Map of tags, each pair of which must exactly match // a pair on the specific VPC Endpoint to retrieve. Tags pulumi.StringMapInput `pulumi:"tags"` + // VPC Endpoint type. Valid values are `Interface`, `Gateway`, `GatewayLoadBalancer`, `Resource`, and `ServiceNetwork`. + VpcEndpointType pulumi.StringPtrInput `pulumi:"vpcEndpointType"` // ID of the VPC in which the specific VPC Endpoint is used. // // The arguments of this data source act as filters for querying the available VPC endpoints. @@ -250,6 +258,10 @@ func (o LookupVpcEndpointResultOutput) ServiceName() pulumi.StringOutput { return o.ApplyT(func(v LookupVpcEndpointResult) string { return v.ServiceName }).(pulumi.StringOutput) } +func (o LookupVpcEndpointResultOutput) ServiceRegion() pulumi.StringOutput { + return o.ApplyT(func(v LookupVpcEndpointResult) string { return v.ServiceRegion }).(pulumi.StringOutput) +} + func (o LookupVpcEndpointResultOutput) State() pulumi.StringOutput { return o.ApplyT(func(v LookupVpcEndpointResult) string { return v.State }).(pulumi.StringOutput) } @@ -263,7 +275,6 @@ func (o LookupVpcEndpointResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupVpcEndpointResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } -// VPC Endpoint type, `Gateway` or `Interface`. func (o LookupVpcEndpointResultOutput) VpcEndpointType() pulumi.StringOutput { return o.ApplyT(func(v LookupVpcEndpointResult) string { return v.VpcEndpointType }).(pulumi.StringOutput) } diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2/pulumiTypes.go b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2/pulumiTypes.go index 522b38063..cdf16ee08 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2/pulumiTypes.go +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2/pulumiTypes.go @@ -38469,8 +38469,12 @@ func (o VpcEndpointDnsEntryArrayOutput) Index(i pulumi.IntInput) VpcEndpointDnsE type VpcEndpointDnsOptions struct { // The DNS records created for the endpoint. Valid values are `ipv4`, `dualstack`, `service-defined`, and `ipv6`. DnsRecordIpType *string `pulumi:"dnsRecordIpType"` - // Indicates whether to enable private DNS only for inbound endpoints. This option is available only for services that support both gateway and interface endpoints. It routes traffic that originates from the VPC to the gateway endpoint and traffic that originates from on-premises to the interface endpoint. Default is `false`. Can only be specified if privateDnsEnabled is `true`. + // Boolean indicating whether to enable private DNS only for inbound endpoints. This option is available only for interface endpoints of services that support both gateway and interface endpoints. A gateway endpoint for the same service must be created before an interface endpoint is created. Traffic originating from the VPC is routed to the gateway endpoint, while traffic originating from on-premises is routed to the interface endpoint. Defaults to `false`. This argument can be specified only if `privateDnsEnabled` is `true`. PrivateDnsOnlyForInboundResolverEndpoint *bool `pulumi:"privateDnsOnlyForInboundResolverEndpoint"` + // Preference for which private domains have a private hosted zone created for and associated with the specified VPC. Valid values are `ALL_DOMAINS`, `VERIFIED_DOMAINS_ONLY`, `VERIFIED_DOMAINS_AND_SPECIFIED_DOMAINS`, and `SPECIFIED_DOMAINS_ONLY`. Only supported when `privateDnsEnabled` is `true` and when the `vpcEndpointType` is `ServiceNetwork` or `Resource`. + PrivateDnsPreference *string `pulumi:"privateDnsPreference"` + // List of private domains to create private hosted zones for and associate with the specified VPC. Must be specified when `privateDnsEnabled` is `true` and `privateDnsPreference` is set to either `VERIFIED_DOMAINS_AND_SPECIFIED_DOMAINS` or `SPECIFIED_DOMAINS_ONLY`. In all other cases, this argument must not be specified. + PrivateDnsSpecifiedDomains []string `pulumi:"privateDnsSpecifiedDomains"` } // VpcEndpointDnsOptionsInput is an input type that accepts VpcEndpointDnsOptionsArgs and VpcEndpointDnsOptionsOutput values. @@ -38487,8 +38491,12 @@ type VpcEndpointDnsOptionsInput interface { type VpcEndpointDnsOptionsArgs struct { // The DNS records created for the endpoint. Valid values are `ipv4`, `dualstack`, `service-defined`, and `ipv6`. DnsRecordIpType pulumi.StringPtrInput `pulumi:"dnsRecordIpType"` - // Indicates whether to enable private DNS only for inbound endpoints. This option is available only for services that support both gateway and interface endpoints. It routes traffic that originates from the VPC to the gateway endpoint and traffic that originates from on-premises to the interface endpoint. Default is `false`. Can only be specified if privateDnsEnabled is `true`. + // Boolean indicating whether to enable private DNS only for inbound endpoints. This option is available only for interface endpoints of services that support both gateway and interface endpoints. A gateway endpoint for the same service must be created before an interface endpoint is created. Traffic originating from the VPC is routed to the gateway endpoint, while traffic originating from on-premises is routed to the interface endpoint. Defaults to `false`. This argument can be specified only if `privateDnsEnabled` is `true`. PrivateDnsOnlyForInboundResolverEndpoint pulumi.BoolPtrInput `pulumi:"privateDnsOnlyForInboundResolverEndpoint"` + // Preference for which private domains have a private hosted zone created for and associated with the specified VPC. Valid values are `ALL_DOMAINS`, `VERIFIED_DOMAINS_ONLY`, `VERIFIED_DOMAINS_AND_SPECIFIED_DOMAINS`, and `SPECIFIED_DOMAINS_ONLY`. Only supported when `privateDnsEnabled` is `true` and when the `vpcEndpointType` is `ServiceNetwork` or `Resource`. + PrivateDnsPreference pulumi.StringPtrInput `pulumi:"privateDnsPreference"` + // List of private domains to create private hosted zones for and associate with the specified VPC. Must be specified when `privateDnsEnabled` is `true` and `privateDnsPreference` is set to either `VERIFIED_DOMAINS_AND_SPECIFIED_DOMAINS` or `SPECIFIED_DOMAINS_ONLY`. In all other cases, this argument must not be specified. + PrivateDnsSpecifiedDomains pulumi.StringArrayInput `pulumi:"privateDnsSpecifiedDomains"` } func (VpcEndpointDnsOptionsArgs) ElementType() reflect.Type { @@ -38573,11 +38581,21 @@ func (o VpcEndpointDnsOptionsOutput) DnsRecordIpType() pulumi.StringPtrOutput { return o.ApplyT(func(v VpcEndpointDnsOptions) *string { return v.DnsRecordIpType }).(pulumi.StringPtrOutput) } -// Indicates whether to enable private DNS only for inbound endpoints. This option is available only for services that support both gateway and interface endpoints. It routes traffic that originates from the VPC to the gateway endpoint and traffic that originates from on-premises to the interface endpoint. Default is `false`. Can only be specified if privateDnsEnabled is `true`. +// Boolean indicating whether to enable private DNS only for inbound endpoints. This option is available only for interface endpoints of services that support both gateway and interface endpoints. A gateway endpoint for the same service must be created before an interface endpoint is created. Traffic originating from the VPC is routed to the gateway endpoint, while traffic originating from on-premises is routed to the interface endpoint. Defaults to `false`. This argument can be specified only if `privateDnsEnabled` is `true`. func (o VpcEndpointDnsOptionsOutput) PrivateDnsOnlyForInboundResolverEndpoint() pulumi.BoolPtrOutput { return o.ApplyT(func(v VpcEndpointDnsOptions) *bool { return v.PrivateDnsOnlyForInboundResolverEndpoint }).(pulumi.BoolPtrOutput) } +// Preference for which private domains have a private hosted zone created for and associated with the specified VPC. Valid values are `ALL_DOMAINS`, `VERIFIED_DOMAINS_ONLY`, `VERIFIED_DOMAINS_AND_SPECIFIED_DOMAINS`, and `SPECIFIED_DOMAINS_ONLY`. Only supported when `privateDnsEnabled` is `true` and when the `vpcEndpointType` is `ServiceNetwork` or `Resource`. +func (o VpcEndpointDnsOptionsOutput) PrivateDnsPreference() pulumi.StringPtrOutput { + return o.ApplyT(func(v VpcEndpointDnsOptions) *string { return v.PrivateDnsPreference }).(pulumi.StringPtrOutput) +} + +// List of private domains to create private hosted zones for and associate with the specified VPC. Must be specified when `privateDnsEnabled` is `true` and `privateDnsPreference` is set to either `VERIFIED_DOMAINS_AND_SPECIFIED_DOMAINS` or `SPECIFIED_DOMAINS_ONLY`. In all other cases, this argument must not be specified. +func (o VpcEndpointDnsOptionsOutput) PrivateDnsSpecifiedDomains() pulumi.StringArrayOutput { + return o.ApplyT(func(v VpcEndpointDnsOptions) []string { return v.PrivateDnsSpecifiedDomains }).(pulumi.StringArrayOutput) +} + type VpcEndpointDnsOptionsPtrOutput struct{ *pulumi.OutputState } func (VpcEndpointDnsOptionsPtrOutput) ElementType() reflect.Type { @@ -38612,7 +38630,7 @@ func (o VpcEndpointDnsOptionsPtrOutput) DnsRecordIpType() pulumi.StringPtrOutput }).(pulumi.StringPtrOutput) } -// Indicates whether to enable private DNS only for inbound endpoints. This option is available only for services that support both gateway and interface endpoints. It routes traffic that originates from the VPC to the gateway endpoint and traffic that originates from on-premises to the interface endpoint. Default is `false`. Can only be specified if privateDnsEnabled is `true`. +// Boolean indicating whether to enable private DNS only for inbound endpoints. This option is available only for interface endpoints of services that support both gateway and interface endpoints. A gateway endpoint for the same service must be created before an interface endpoint is created. Traffic originating from the VPC is routed to the gateway endpoint, while traffic originating from on-premises is routed to the interface endpoint. Defaults to `false`. This argument can be specified only if `privateDnsEnabled` is `true`. func (o VpcEndpointDnsOptionsPtrOutput) PrivateDnsOnlyForInboundResolverEndpoint() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VpcEndpointDnsOptions) *bool { if v == nil { @@ -38622,6 +38640,26 @@ func (o VpcEndpointDnsOptionsPtrOutput) PrivateDnsOnlyForInboundResolverEndpoint }).(pulumi.BoolPtrOutput) } +// Preference for which private domains have a private hosted zone created for and associated with the specified VPC. Valid values are `ALL_DOMAINS`, `VERIFIED_DOMAINS_ONLY`, `VERIFIED_DOMAINS_AND_SPECIFIED_DOMAINS`, and `SPECIFIED_DOMAINS_ONLY`. Only supported when `privateDnsEnabled` is `true` and when the `vpcEndpointType` is `ServiceNetwork` or `Resource`. +func (o VpcEndpointDnsOptionsPtrOutput) PrivateDnsPreference() pulumi.StringPtrOutput { + return o.ApplyT(func(v *VpcEndpointDnsOptions) *string { + if v == nil { + return nil + } + return v.PrivateDnsPreference + }).(pulumi.StringPtrOutput) +} + +// List of private domains to create private hosted zones for and associate with the specified VPC. Must be specified when `privateDnsEnabled` is `true` and `privateDnsPreference` is set to either `VERIFIED_DOMAINS_AND_SPECIFIED_DOMAINS` or `SPECIFIED_DOMAINS_ONLY`. In all other cases, this argument must not be specified. +func (o VpcEndpointDnsOptionsPtrOutput) PrivateDnsSpecifiedDomains() pulumi.StringArrayOutput { + return o.ApplyT(func(v *VpcEndpointDnsOptions) []string { + if v == nil { + return nil + } + return v.PrivateDnsSpecifiedDomains + }).(pulumi.StringArrayOutput) +} + type VpcEndpointServicePrivateDnsNameConfiguration struct { // Name of the record subdomain the service provider needs to create. Name *string `pulumi:"name"` @@ -63101,6 +63139,10 @@ type GetVpcEndpointDnsOption struct { DnsRecordIpType string `pulumi:"dnsRecordIpType"` // Indicates whether to enable private DNS only for inbound endpoints. PrivateDnsOnlyForInboundResolverEndpoint bool `pulumi:"privateDnsOnlyForInboundResolverEndpoint"` + // Preference for which private domains have a private hosted zone created for and associated with the specified VPC. + PrivateDnsPreference string `pulumi:"privateDnsPreference"` + // List of private domains to create private hosted zones for and associate with the specified VPC. + PrivateDnsSpecifiedDomains []string `pulumi:"privateDnsSpecifiedDomains"` } // GetVpcEndpointDnsOptionInput is an input type that accepts GetVpcEndpointDnsOptionArgs and GetVpcEndpointDnsOptionOutput values. @@ -63119,6 +63161,10 @@ type GetVpcEndpointDnsOptionArgs struct { DnsRecordIpType pulumi.StringInput `pulumi:"dnsRecordIpType"` // Indicates whether to enable private DNS only for inbound endpoints. PrivateDnsOnlyForInboundResolverEndpoint pulumi.BoolInput `pulumi:"privateDnsOnlyForInboundResolverEndpoint"` + // Preference for which private domains have a private hosted zone created for and associated with the specified VPC. + PrivateDnsPreference pulumi.StringInput `pulumi:"privateDnsPreference"` + // List of private domains to create private hosted zones for and associate with the specified VPC. + PrivateDnsSpecifiedDomains pulumi.StringArrayInput `pulumi:"privateDnsSpecifiedDomains"` } func (GetVpcEndpointDnsOptionArgs) ElementType() reflect.Type { @@ -63182,6 +63228,16 @@ func (o GetVpcEndpointDnsOptionOutput) PrivateDnsOnlyForInboundResolverEndpoint( return o.ApplyT(func(v GetVpcEndpointDnsOption) bool { return v.PrivateDnsOnlyForInboundResolverEndpoint }).(pulumi.BoolOutput) } +// Preference for which private domains have a private hosted zone created for and associated with the specified VPC. +func (o GetVpcEndpointDnsOptionOutput) PrivateDnsPreference() pulumi.StringOutput { + return o.ApplyT(func(v GetVpcEndpointDnsOption) string { return v.PrivateDnsPreference }).(pulumi.StringOutput) +} + +// List of private domains to create private hosted zones for and associate with the specified VPC. +func (o GetVpcEndpointDnsOptionOutput) PrivateDnsSpecifiedDomains() pulumi.StringArrayOutput { + return o.ApplyT(func(v GetVpcEndpointDnsOption) []string { return v.PrivateDnsSpecifiedDomains }).(pulumi.StringArrayOutput) +} + type GetVpcEndpointDnsOptionArrayOutput struct{ *pulumi.OutputState } func (GetVpcEndpointDnsOptionArrayOutput) ElementType() reflect.Type { diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ecs/pulumiTypes.go b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ecs/pulumiTypes.go index 7c7380e87..6c767dbe1 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ecs/pulumiTypes.go +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ecs/pulumiTypes.go @@ -774,6 +774,8 @@ func (o CapacityProviderManagedInstancesProviderInfrastructureOptimizationPtrOut } type CapacityProviderManagedInstancesProviderInstanceLaunchTemplate struct { + // The purchasing option for the EC2 instances used in the capacity provider. Determines whether to use On-Demand or Spot instances. Valid values are `ON_DEMAND` and `SPOT`. Defaults to `ON_DEMAND` when not specified. Changing this value will trigger replacement of the capacity provider. For more information, see [Amazon EC2 billing and purchasing options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html) in the Amazon EC2 User Guide. + CapacityOptionType *string `pulumi:"capacityOptionType"` // The Amazon Resource Name (ARN) of the instance profile that Amazon ECS applies to Amazon ECS Managed Instances. This instance profile must include the necessary permissions for your tasks to access AWS services and resources. For more information, see [Amazon ECS instance profile for Managed Instances](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/instance_IAM_role.html) in the Amazon ECS Developer Guide. Ec2InstanceProfileArn string `pulumi:"ec2InstanceProfileArn"` // The instance requirements. You can specify the instance types and instance requirements such as vCPU count, memory, network performance, and accelerator specifications. Amazon ECS automatically selects the instances that match the specified criteria. Detailed below. @@ -798,6 +800,8 @@ type CapacityProviderManagedInstancesProviderInstanceLaunchTemplateInput interfa } type CapacityProviderManagedInstancesProviderInstanceLaunchTemplateArgs struct { + // The purchasing option for the EC2 instances used in the capacity provider. Determines whether to use On-Demand or Spot instances. Valid values are `ON_DEMAND` and `SPOT`. Defaults to `ON_DEMAND` when not specified. Changing this value will trigger replacement of the capacity provider. For more information, see [Amazon EC2 billing and purchasing options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html) in the Amazon EC2 User Guide. + CapacityOptionType pulumi.StringPtrInput `pulumi:"capacityOptionType"` // The Amazon Resource Name (ARN) of the instance profile that Amazon ECS applies to Amazon ECS Managed Instances. This instance profile must include the necessary permissions for your tasks to access AWS services and resources. For more information, see [Amazon ECS instance profile for Managed Instances](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/instance_IAM_role.html) in the Amazon ECS Developer Guide. Ec2InstanceProfileArn pulumi.StringInput `pulumi:"ec2InstanceProfileArn"` // The instance requirements. You can specify the instance types and instance requirements such as vCPU count, memory, network performance, and accelerator specifications. Amazon ECS automatically selects the instances that match the specified criteria. Detailed below. @@ -887,6 +891,13 @@ func (o CapacityProviderManagedInstancesProviderInstanceLaunchTemplateOutput) To }).(CapacityProviderManagedInstancesProviderInstanceLaunchTemplatePtrOutput) } +// The purchasing option for the EC2 instances used in the capacity provider. Determines whether to use On-Demand or Spot instances. Valid values are `ON_DEMAND` and `SPOT`. Defaults to `ON_DEMAND` when not specified. Changing this value will trigger replacement of the capacity provider. For more information, see [Amazon EC2 billing and purchasing options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html) in the Amazon EC2 User Guide. +func (o CapacityProviderManagedInstancesProviderInstanceLaunchTemplateOutput) CapacityOptionType() pulumi.StringPtrOutput { + return o.ApplyT(func(v CapacityProviderManagedInstancesProviderInstanceLaunchTemplate) *string { + return v.CapacityOptionType + }).(pulumi.StringPtrOutput) +} + // The Amazon Resource Name (ARN) of the instance profile that Amazon ECS applies to Amazon ECS Managed Instances. This instance profile must include the necessary permissions for your tasks to access AWS services and resources. For more information, see [Amazon ECS instance profile for Managed Instances](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/instance_IAM_role.html) in the Amazon ECS Developer Guide. func (o CapacityProviderManagedInstancesProviderInstanceLaunchTemplateOutput) Ec2InstanceProfileArn() pulumi.StringOutput { return o.ApplyT(func(v CapacityProviderManagedInstancesProviderInstanceLaunchTemplate) string { @@ -944,6 +955,16 @@ func (o CapacityProviderManagedInstancesProviderInstanceLaunchTemplatePtrOutput) }).(CapacityProviderManagedInstancesProviderInstanceLaunchTemplateOutput) } +// The purchasing option for the EC2 instances used in the capacity provider. Determines whether to use On-Demand or Spot instances. Valid values are `ON_DEMAND` and `SPOT`. Defaults to `ON_DEMAND` when not specified. Changing this value will trigger replacement of the capacity provider. For more information, see [Amazon EC2 billing and purchasing options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html) in the Amazon EC2 User Guide. +func (o CapacityProviderManagedInstancesProviderInstanceLaunchTemplatePtrOutput) CapacityOptionType() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CapacityProviderManagedInstancesProviderInstanceLaunchTemplate) *string { + if v == nil { + return nil + } + return v.CapacityOptionType + }).(pulumi.StringPtrOutput) +} + // The Amazon Resource Name (ARN) of the instance profile that Amazon ECS applies to Amazon ECS Managed Instances. This instance profile must include the necessary permissions for your tasks to access AWS services and resources. For more information, see [Amazon ECS instance profile for Managed Instances](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/instance_IAM_role.html) in the Amazon ECS Developer Guide. func (o CapacityProviderManagedInstancesProviderInstanceLaunchTemplatePtrOutput) Ec2InstanceProfileArn() pulumi.StringPtrOutput { return o.ApplyT(func(v *CapacityProviderManagedInstancesProviderInstanceLaunchTemplate) *string { diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ecs/taskDefinition.go b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ecs/taskDefinition.go index 228efc724..f0d85fc45 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ecs/taskDefinition.go +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ecs/taskDefinition.go @@ -424,13 +424,13 @@ type TaskDefinition struct { // // The following arguments are optional: Family pulumi.StringOutput `pulumi:"family"` - // IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`. + // IPC resource namespace to be used for the containers in the task. Valid values: `host`, `task`, `none`. IpcMode pulumi.StringPtrOutput `pulumi:"ipcMode"` // Amount (in MiB) of memory used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required. Memory pulumi.StringPtrOutput `pulumi:"memory"` - // Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`. + // Docker networking mode to use for the containers in the task. Valid values: `awsvpc`, `bridge`, `host`, and `none`. NetworkMode pulumi.StringOutput `pulumi:"networkMode"` - // Process namespace to use for the containers in the task. The valid values are `host` and `task`. + // Process namespace to use for the containers in the task. Valid values: host` , `task`. PidMode pulumi.StringPtrOutput `pulumi:"pidMode"` // Configuration block for rules that are taken into consideration during task placement. Maximum number of `placementConstraints` is `10`. Detailed below. PlacementConstraints TaskDefinitionPlacementConstraintArrayOutput `pulumi:"placementConstraints"` @@ -438,7 +438,7 @@ type TaskDefinition struct { ProxyConfiguration TaskDefinitionProxyConfigurationPtrOutput `pulumi:"proxyConfiguration"` // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region pulumi.StringOutput `pulumi:"region"` - // Set of launch types required by the task. The valid values are `EC2` and `FARGATE`. + // Set of launch types required by the task. Valid values: `EC2`, `EXTERNAL`, `FARGATE`, `MANAGED_INSTANCES`. RequiresCompatibilities pulumi.StringArrayOutput `pulumi:"requiresCompatibilities"` // Revision of the task in a particular family. Revision pulumi.IntOutput `pulumi:"revision"` @@ -516,13 +516,13 @@ type taskDefinitionState struct { // // The following arguments are optional: Family *string `pulumi:"family"` - // IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`. + // IPC resource namespace to be used for the containers in the task. Valid values: `host`, `task`, `none`. IpcMode *string `pulumi:"ipcMode"` // Amount (in MiB) of memory used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required. Memory *string `pulumi:"memory"` - // Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`. + // Docker networking mode to use for the containers in the task. Valid values: `awsvpc`, `bridge`, `host`, and `none`. NetworkMode *string `pulumi:"networkMode"` - // Process namespace to use for the containers in the task. The valid values are `host` and `task`. + // Process namespace to use for the containers in the task. Valid values: host` , `task`. PidMode *string `pulumi:"pidMode"` // Configuration block for rules that are taken into consideration during task placement. Maximum number of `placementConstraints` is `10`. Detailed below. PlacementConstraints []TaskDefinitionPlacementConstraint `pulumi:"placementConstraints"` @@ -530,7 +530,7 @@ type taskDefinitionState struct { ProxyConfiguration *TaskDefinitionProxyConfiguration `pulumi:"proxyConfiguration"` // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region *string `pulumi:"region"` - // Set of launch types required by the task. The valid values are `EC2` and `FARGATE`. + // Set of launch types required by the task. Valid values: `EC2`, `EXTERNAL`, `FARGATE`, `MANAGED_INSTANCES`. RequiresCompatibilities []string `pulumi:"requiresCompatibilities"` // Revision of the task in a particular family. Revision *int `pulumi:"revision"` @@ -573,13 +573,13 @@ type TaskDefinitionState struct { // // The following arguments are optional: Family pulumi.StringPtrInput - // IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`. + // IPC resource namespace to be used for the containers in the task. Valid values: `host`, `task`, `none`. IpcMode pulumi.StringPtrInput // Amount (in MiB) of memory used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required. Memory pulumi.StringPtrInput - // Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`. + // Docker networking mode to use for the containers in the task. Valid values: `awsvpc`, `bridge`, `host`, and `none`. NetworkMode pulumi.StringPtrInput - // Process namespace to use for the containers in the task. The valid values are `host` and `task`. + // Process namespace to use for the containers in the task. Valid values: host` , `task`. PidMode pulumi.StringPtrInput // Configuration block for rules that are taken into consideration during task placement. Maximum number of `placementConstraints` is `10`. Detailed below. PlacementConstraints TaskDefinitionPlacementConstraintArrayInput @@ -587,7 +587,7 @@ type TaskDefinitionState struct { ProxyConfiguration TaskDefinitionProxyConfigurationPtrInput // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region pulumi.StringPtrInput - // Set of launch types required by the task. The valid values are `EC2` and `FARGATE`. + // Set of launch types required by the task. Valid values: `EC2`, `EXTERNAL`, `FARGATE`, `MANAGED_INSTANCES`. RequiresCompatibilities pulumi.StringArrayInput // Revision of the task in a particular family. Revision pulumi.IntPtrInput @@ -630,13 +630,13 @@ type taskDefinitionArgs struct { // // The following arguments are optional: Family string `pulumi:"family"` - // IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`. + // IPC resource namespace to be used for the containers in the task. Valid values: `host`, `task`, `none`. IpcMode *string `pulumi:"ipcMode"` // Amount (in MiB) of memory used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required. Memory *string `pulumi:"memory"` - // Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`. + // Docker networking mode to use for the containers in the task. Valid values: `awsvpc`, `bridge`, `host`, and `none`. NetworkMode *string `pulumi:"networkMode"` - // Process namespace to use for the containers in the task. The valid values are `host` and `task`. + // Process namespace to use for the containers in the task. Valid values: host` , `task`. PidMode *string `pulumi:"pidMode"` // Configuration block for rules that are taken into consideration during task placement. Maximum number of `placementConstraints` is `10`. Detailed below. PlacementConstraints []TaskDefinitionPlacementConstraint `pulumi:"placementConstraints"` @@ -644,7 +644,7 @@ type taskDefinitionArgs struct { ProxyConfiguration *TaskDefinitionProxyConfiguration `pulumi:"proxyConfiguration"` // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region *string `pulumi:"region"` - // Set of launch types required by the task. The valid values are `EC2` and `FARGATE`. + // Set of launch types required by the task. Valid values: `EC2`, `EXTERNAL`, `FARGATE`, `MANAGED_INSTANCES`. RequiresCompatibilities []string `pulumi:"requiresCompatibilities"` // Configuration block for runtimePlatform that containers in your task may use. RuntimePlatform *TaskDefinitionRuntimePlatform `pulumi:"runtimePlatform"` @@ -680,13 +680,13 @@ type TaskDefinitionArgs struct { // // The following arguments are optional: Family pulumi.StringInput - // IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`. + // IPC resource namespace to be used for the containers in the task. Valid values: `host`, `task`, `none`. IpcMode pulumi.StringPtrInput // Amount (in MiB) of memory used by the task. If the `requiresCompatibilities` is `FARGATE` this field is required. Memory pulumi.StringPtrInput - // Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`. + // Docker networking mode to use for the containers in the task. Valid values: `awsvpc`, `bridge`, `host`, and `none`. NetworkMode pulumi.StringPtrInput - // Process namespace to use for the containers in the task. The valid values are `host` and `task`. + // Process namespace to use for the containers in the task. Valid values: host` , `task`. PidMode pulumi.StringPtrInput // Configuration block for rules that are taken into consideration during task placement. Maximum number of `placementConstraints` is `10`. Detailed below. PlacementConstraints TaskDefinitionPlacementConstraintArrayInput @@ -694,7 +694,7 @@ type TaskDefinitionArgs struct { ProxyConfiguration TaskDefinitionProxyConfigurationPtrInput // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region pulumi.StringPtrInput - // Set of launch types required by the task. The valid values are `EC2` and `FARGATE`. + // Set of launch types required by the task. Valid values: `EC2`, `EXTERNAL`, `FARGATE`, `MANAGED_INSTANCES`. RequiresCompatibilities pulumi.StringArrayInput // Configuration block for runtimePlatform that containers in your task may use. RuntimePlatform TaskDefinitionRuntimePlatformPtrInput @@ -843,7 +843,7 @@ func (o TaskDefinitionOutput) Family() pulumi.StringOutput { return o.ApplyT(func(v *TaskDefinition) pulumi.StringOutput { return v.Family }).(pulumi.StringOutput) } -// IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`. +// IPC resource namespace to be used for the containers in the task. Valid values: `host`, `task`, `none`. func (o TaskDefinitionOutput) IpcMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *TaskDefinition) pulumi.StringPtrOutput { return v.IpcMode }).(pulumi.StringPtrOutput) } @@ -853,12 +853,12 @@ func (o TaskDefinitionOutput) Memory() pulumi.StringPtrOutput { return o.ApplyT(func(v *TaskDefinition) pulumi.StringPtrOutput { return v.Memory }).(pulumi.StringPtrOutput) } -// Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`. +// Docker networking mode to use for the containers in the task. Valid values: `awsvpc`, `bridge`, `host`, and `none`. func (o TaskDefinitionOutput) NetworkMode() pulumi.StringOutput { return o.ApplyT(func(v *TaskDefinition) pulumi.StringOutput { return v.NetworkMode }).(pulumi.StringOutput) } -// Process namespace to use for the containers in the task. The valid values are `host` and `task`. +// Process namespace to use for the containers in the task. Valid values: host` , `task`. func (o TaskDefinitionOutput) PidMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *TaskDefinition) pulumi.StringPtrOutput { return v.PidMode }).(pulumi.StringPtrOutput) } @@ -878,7 +878,7 @@ func (o TaskDefinitionOutput) Region() pulumi.StringOutput { return o.ApplyT(func(v *TaskDefinition) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput) } -// Set of launch types required by the task. The valid values are `EC2` and `FARGATE`. +// Set of launch types required by the task. Valid values: `EC2`, `EXTERNAL`, `FARGATE`, `MANAGED_INSTANCES`. func (o TaskDefinitionOutput) RequiresCompatibilities() pulumi.StringArrayOutput { return o.ApplyT(func(v *TaskDefinition) pulumi.StringArrayOutput { return v.RequiresCompatibilities }).(pulumi.StringArrayOutput) } diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/getSamlProvider.go b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/getSamlProvider.go index 90b01f760..a9f1b47ab 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/getSamlProvider.go +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/getSamlProvider.go @@ -69,6 +69,8 @@ type LookupSamlProviderResult struct { Name string `pulumi:"name"` // The XML document generated by an identity provider that supports SAML 2.0. SamlMetadataDocument string `pulumi:"samlMetadataDocument"` + // Unique identifier assigned to the SAML provider. + SamlProviderUuid string `pulumi:"samlProviderUuid"` // Tags attached to the SAML provider. Tags map[string]string `pulumi:"tags"` // Expiration date and time for the SAML provider in RFC1123 format, e.g. `Mon, 02 Jan 2007 15:04:05 MST`. @@ -135,6 +137,11 @@ func (o LookupSamlProviderResultOutput) SamlMetadataDocument() pulumi.StringOutp return o.ApplyT(func(v LookupSamlProviderResult) string { return v.SamlMetadataDocument }).(pulumi.StringOutput) } +// Unique identifier assigned to the SAML provider. +func (o LookupSamlProviderResultOutput) SamlProviderUuid() pulumi.StringOutput { + return o.ApplyT(func(v LookupSamlProviderResult) string { return v.SamlProviderUuid }).(pulumi.StringOutput) +} + // Tags attached to the SAML provider. func (o LookupSamlProviderResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupSamlProviderResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/outboundWebIdentityFederation.go b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/outboundWebIdentityFederation.go index 628056b55..ebc75111e 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/outboundWebIdentityFederation.go +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/outboundWebIdentityFederation.go @@ -37,8 +37,6 @@ import ( // // ## Import // -// In Terraform v1.12.0 and later, the `import` block can be used with the `identity` attribute. For example: -// // Using `pulumi import`, import IAM Outbound Web Identity Federation resources using the AWS account ID. For example: // // ```sh diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/policy.go b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/policy.go index d2eeec5c9..91ad5b325 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/policy.go +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/policy.go @@ -81,6 +81,8 @@ type Policy struct { Arn pulumi.StringOutput `pulumi:"arn"` // Number of entities (users, groups, and roles) that the policy is attached to. AttachmentCount pulumi.IntOutput `pulumi:"attachmentCount"` + // Number of ms to wait between creating the policy and settong its version as default. May be required in environments with very high S3 IO loads. + DelayAfterPolicyCreationInMs pulumi.IntPtrOutput `pulumi:"delayAfterPolicyCreationInMs"` // Description of the IAM policy. Description pulumi.StringPtrOutput `pulumi:"description"` // Name of the policy. If omitted, the provider will assign a random, unique name. @@ -136,6 +138,8 @@ type policyState struct { Arn *string `pulumi:"arn"` // Number of entities (users, groups, and roles) that the policy is attached to. AttachmentCount *int `pulumi:"attachmentCount"` + // Number of ms to wait between creating the policy and settong its version as default. May be required in environments with very high S3 IO loads. + DelayAfterPolicyCreationInMs *int `pulumi:"delayAfterPolicyCreationInMs"` // Description of the IAM policy. Description *string `pulumi:"description"` // Name of the policy. If omitted, the provider will assign a random, unique name. @@ -159,6 +163,8 @@ type PolicyState struct { Arn pulumi.StringPtrInput // Number of entities (users, groups, and roles) that the policy is attached to. AttachmentCount pulumi.IntPtrInput + // Number of ms to wait between creating the policy and settong its version as default. May be required in environments with very high S3 IO loads. + DelayAfterPolicyCreationInMs pulumi.IntPtrInput // Description of the IAM policy. Description pulumi.StringPtrInput // Name of the policy. If omitted, the provider will assign a random, unique name. @@ -182,6 +188,8 @@ func (PolicyState) ElementType() reflect.Type { } type policyArgs struct { + // Number of ms to wait between creating the policy and settong its version as default. May be required in environments with very high S3 IO loads. + DelayAfterPolicyCreationInMs *int `pulumi:"delayAfterPolicyCreationInMs"` // Description of the IAM policy. Description *string `pulumi:"description"` // Name of the policy. If omitted, the provider will assign a random, unique name. @@ -198,6 +206,8 @@ type policyArgs struct { // The set of arguments for constructing a Policy resource. type PolicyArgs struct { + // Number of ms to wait between creating the policy and settong its version as default. May be required in environments with very high S3 IO loads. + DelayAfterPolicyCreationInMs pulumi.IntPtrInput // Description of the IAM policy. Description pulumi.StringPtrInput // Name of the policy. If omitted, the provider will assign a random, unique name. @@ -309,6 +319,11 @@ func (o PolicyOutput) AttachmentCount() pulumi.IntOutput { return o.ApplyT(func(v *Policy) pulumi.IntOutput { return v.AttachmentCount }).(pulumi.IntOutput) } +// Number of ms to wait between creating the policy and settong its version as default. May be required in environments with very high S3 IO loads. +func (o PolicyOutput) DelayAfterPolicyCreationInMs() pulumi.IntPtrOutput { + return o.ApplyT(func(v *Policy) pulumi.IntPtrOutput { return v.DelayAfterPolicyCreationInMs }).(pulumi.IntPtrOutput) +} + // Description of the IAM policy. func (o PolicyOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *Policy) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/samlProvider.go b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/samlProvider.go index 0dd4b1486..55aea92f5 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/samlProvider.go +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/samlProvider.go @@ -68,6 +68,8 @@ type SamlProvider struct { Name pulumi.StringOutput `pulumi:"name"` // An XML document generated by an identity provider that supports SAML 2.0. SamlMetadataDocument pulumi.StringOutput `pulumi:"samlMetadataDocument"` + // Unique identifier assigned to the SAML provider. + SamlProviderUuid pulumi.StringOutput `pulumi:"samlProviderUuid"` // Map of resource tags for the IAM SAML provider. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. Tags pulumi.StringMapOutput `pulumi:"tags"` // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. @@ -115,6 +117,8 @@ type samlProviderState struct { Name *string `pulumi:"name"` // An XML document generated by an identity provider that supports SAML 2.0. SamlMetadataDocument *string `pulumi:"samlMetadataDocument"` + // Unique identifier assigned to the SAML provider. + SamlProviderUuid *string `pulumi:"samlProviderUuid"` // Map of resource tags for the IAM SAML provider. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. Tags map[string]string `pulumi:"tags"` // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. @@ -130,6 +134,8 @@ type SamlProviderState struct { Name pulumi.StringPtrInput // An XML document generated by an identity provider that supports SAML 2.0. SamlMetadataDocument pulumi.StringPtrInput + // Unique identifier assigned to the SAML provider. + SamlProviderUuid pulumi.StringPtrInput // Map of resource tags for the IAM SAML provider. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. Tags pulumi.StringMapInput // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. @@ -263,6 +269,11 @@ func (o SamlProviderOutput) SamlMetadataDocument() pulumi.StringOutput { return o.ApplyT(func(v *SamlProvider) pulumi.StringOutput { return v.SamlMetadataDocument }).(pulumi.StringOutput) } +// Unique identifier assigned to the SAML provider. +func (o SamlProviderOutput) SamlProviderUuid() pulumi.StringOutput { + return o.ApplyT(func(v *SamlProvider) pulumi.StringOutput { return v.SamlProviderUuid }).(pulumi.StringOutput) +} + // Map of resource tags for the IAM SAML provider. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. func (o SamlProviderOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *SamlProvider) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/virtualMfaDevice.go b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/virtualMfaDevice.go index 0483b70f0..6024adb8a 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/virtualMfaDevice.go +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam/virtualMfaDevice.go @@ -58,23 +58,25 @@ import ( type VirtualMfaDevice struct { pulumi.CustomResourceState - // The Amazon Resource Name (ARN) specifying the virtual mfa device. + // Amazon Resource Name (ARN), which is also the serial number, of the virtual MFA device. Arn pulumi.StringOutput `pulumi:"arn"` - // The base32 seed defined as specified in [RFC3548](https://tools.ietf.org/html/rfc3548.txt). The `base32StringSeed` is base64-encoded. + // Base32 seed defined as specified in [RFC3548](https://tools.ietf.org/html/rfc3548.txt). The `base32StringSeed` is base64-encoded. Base32StringSeed pulumi.StringOutput `pulumi:"base32StringSeed"` - // The date and time when the virtual MFA device was enabled. + // Date and time when the virtual MFA device was enabled. EnableDate pulumi.StringOutput `pulumi:"enableDate"` - // The path for the virtual MFA device. + // Path for the virtual MFA device. Path pulumi.StringPtrOutput `pulumi:"path"` - // A QR code PNG image that encodes `otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String` where `$virtualMFADeviceName` is one of the create call arguments. AccountName is the user name if set (otherwise, the account ID), and Base32String is the seed in base32 format. + // QR code PNG image that encodes `otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String` where `$virtualMFADeviceName` is one of the create call arguments. `AccountName` is the user name if set (otherwise, the account ID), and `Base32String` is the seed in base32 format. QrCodePng pulumi.StringOutput `pulumi:"qrCodePng"` + // Serial number associated with the virtual MFA device. + SerialNumber pulumi.StringOutput `pulumi:"serialNumber"` // Map of resource tags for the virtual mfa device. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. Tags pulumi.StringMapOutput `pulumi:"tags"` - // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. + // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` - // The associated IAM User name if the virtual MFA device is enabled. + // Name of the IAM user associated with this virtual MFA device. UserName pulumi.StringOutput `pulumi:"userName"` - // The name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. + // Name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. VirtualMfaDeviceName pulumi.StringOutput `pulumi:"virtualMfaDeviceName"` } @@ -111,44 +113,48 @@ func GetVirtualMfaDevice(ctx *pulumi.Context, // Input properties used for looking up and filtering VirtualMfaDevice resources. type virtualMfaDeviceState struct { - // The Amazon Resource Name (ARN) specifying the virtual mfa device. + // Amazon Resource Name (ARN), which is also the serial number, of the virtual MFA device. Arn *string `pulumi:"arn"` - // The base32 seed defined as specified in [RFC3548](https://tools.ietf.org/html/rfc3548.txt). The `base32StringSeed` is base64-encoded. + // Base32 seed defined as specified in [RFC3548](https://tools.ietf.org/html/rfc3548.txt). The `base32StringSeed` is base64-encoded. Base32StringSeed *string `pulumi:"base32StringSeed"` - // The date and time when the virtual MFA device was enabled. + // Date and time when the virtual MFA device was enabled. EnableDate *string `pulumi:"enableDate"` - // The path for the virtual MFA device. + // Path for the virtual MFA device. Path *string `pulumi:"path"` - // A QR code PNG image that encodes `otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String` where `$virtualMFADeviceName` is one of the create call arguments. AccountName is the user name if set (otherwise, the account ID), and Base32String is the seed in base32 format. + // QR code PNG image that encodes `otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String` where `$virtualMFADeviceName` is one of the create call arguments. `AccountName` is the user name if set (otherwise, the account ID), and `Base32String` is the seed in base32 format. QrCodePng *string `pulumi:"qrCodePng"` + // Serial number associated with the virtual MFA device. + SerialNumber *string `pulumi:"serialNumber"` // Map of resource tags for the virtual mfa device. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. Tags map[string]string `pulumi:"tags"` - // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. + // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. TagsAll map[string]string `pulumi:"tagsAll"` - // The associated IAM User name if the virtual MFA device is enabled. + // Name of the IAM user associated with this virtual MFA device. UserName *string `pulumi:"userName"` - // The name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. + // Name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. VirtualMfaDeviceName *string `pulumi:"virtualMfaDeviceName"` } type VirtualMfaDeviceState struct { - // The Amazon Resource Name (ARN) specifying the virtual mfa device. + // Amazon Resource Name (ARN), which is also the serial number, of the virtual MFA device. Arn pulumi.StringPtrInput - // The base32 seed defined as specified in [RFC3548](https://tools.ietf.org/html/rfc3548.txt). The `base32StringSeed` is base64-encoded. + // Base32 seed defined as specified in [RFC3548](https://tools.ietf.org/html/rfc3548.txt). The `base32StringSeed` is base64-encoded. Base32StringSeed pulumi.StringPtrInput - // The date and time when the virtual MFA device was enabled. + // Date and time when the virtual MFA device was enabled. EnableDate pulumi.StringPtrInput - // The path for the virtual MFA device. + // Path for the virtual MFA device. Path pulumi.StringPtrInput - // A QR code PNG image that encodes `otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String` where `$virtualMFADeviceName` is one of the create call arguments. AccountName is the user name if set (otherwise, the account ID), and Base32String is the seed in base32 format. + // QR code PNG image that encodes `otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String` where `$virtualMFADeviceName` is one of the create call arguments. `AccountName` is the user name if set (otherwise, the account ID), and `Base32String` is the seed in base32 format. QrCodePng pulumi.StringPtrInput + // Serial number associated with the virtual MFA device. + SerialNumber pulumi.StringPtrInput // Map of resource tags for the virtual mfa device. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. Tags pulumi.StringMapInput - // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. + // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. TagsAll pulumi.StringMapInput - // The associated IAM User name if the virtual MFA device is enabled. + // Name of the IAM user associated with this virtual MFA device. UserName pulumi.StringPtrInput - // The name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. + // Name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. VirtualMfaDeviceName pulumi.StringPtrInput } @@ -157,21 +163,21 @@ func (VirtualMfaDeviceState) ElementType() reflect.Type { } type virtualMfaDeviceArgs struct { - // The path for the virtual MFA device. + // Path for the virtual MFA device. Path *string `pulumi:"path"` // Map of resource tags for the virtual mfa device. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. Tags map[string]string `pulumi:"tags"` - // The name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. + // Name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. VirtualMfaDeviceName string `pulumi:"virtualMfaDeviceName"` } // The set of arguments for constructing a VirtualMfaDevice resource. type VirtualMfaDeviceArgs struct { - // The path for the virtual MFA device. + // Path for the virtual MFA device. Path pulumi.StringPtrInput // Map of resource tags for the virtual mfa device. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. Tags pulumi.StringMapInput - // The name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. + // Name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. VirtualMfaDeviceName pulumi.StringInput } @@ -262,47 +268,52 @@ func (o VirtualMfaDeviceOutput) ToVirtualMfaDeviceOutputWithContext(ctx context. return o } -// The Amazon Resource Name (ARN) specifying the virtual mfa device. +// Amazon Resource Name (ARN), which is also the serial number, of the virtual MFA device. func (o VirtualMfaDeviceOutput) Arn() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMfaDevice) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) } -// The base32 seed defined as specified in [RFC3548](https://tools.ietf.org/html/rfc3548.txt). The `base32StringSeed` is base64-encoded. +// Base32 seed defined as specified in [RFC3548](https://tools.ietf.org/html/rfc3548.txt). The `base32StringSeed` is base64-encoded. func (o VirtualMfaDeviceOutput) Base32StringSeed() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMfaDevice) pulumi.StringOutput { return v.Base32StringSeed }).(pulumi.StringOutput) } -// The date and time when the virtual MFA device was enabled. +// Date and time when the virtual MFA device was enabled. func (o VirtualMfaDeviceOutput) EnableDate() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMfaDevice) pulumi.StringOutput { return v.EnableDate }).(pulumi.StringOutput) } -// The path for the virtual MFA device. +// Path for the virtual MFA device. func (o VirtualMfaDeviceOutput) Path() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMfaDevice) pulumi.StringPtrOutput { return v.Path }).(pulumi.StringPtrOutput) } -// A QR code PNG image that encodes `otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String` where `$virtualMFADeviceName` is one of the create call arguments. AccountName is the user name if set (otherwise, the account ID), and Base32String is the seed in base32 format. +// QR code PNG image that encodes `otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String` where `$virtualMFADeviceName` is one of the create call arguments. `AccountName` is the user name if set (otherwise, the account ID), and `Base32String` is the seed in base32 format. func (o VirtualMfaDeviceOutput) QrCodePng() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMfaDevice) pulumi.StringOutput { return v.QrCodePng }).(pulumi.StringOutput) } +// Serial number associated with the virtual MFA device. +func (o VirtualMfaDeviceOutput) SerialNumber() pulumi.StringOutput { + return o.ApplyT(func(v *VirtualMfaDevice) pulumi.StringOutput { return v.SerialNumber }).(pulumi.StringOutput) +} + // Map of resource tags for the virtual mfa device. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. func (o VirtualMfaDeviceOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *VirtualMfaDevice) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } -// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. +// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. func (o VirtualMfaDeviceOutput) TagsAll() pulumi.StringMapOutput { return o.ApplyT(func(v *VirtualMfaDevice) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) } -// The associated IAM User name if the virtual MFA device is enabled. +// Name of the IAM user associated with this virtual MFA device. func (o VirtualMfaDeviceOutput) UserName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMfaDevice) pulumi.StringOutput { return v.UserName }).(pulumi.StringOutput) } -// The name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. +// Name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. func (o VirtualMfaDeviceOutput) VirtualMfaDeviceName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMfaDevice) pulumi.StringOutput { return v.VirtualMfaDeviceName }).(pulumi.StringOutput) } diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/internal/pulumiUtilities.go b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/internal/pulumiUtilities.go index c6886763d..07b7c9b1f 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/internal/pulumiUtilities.go +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/internal/pulumiUtilities.go @@ -165,7 +165,7 @@ func callPlainInner( func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { defaults := []pulumi.ResourceOption{} - version := semver.MustParse("7.15.0") + version := semver.MustParse("7.16.0") 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("7.15.0") + version := semver.MustParse("7.16.0") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb/listener.go b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb/listener.go index 229579769..3aefab7fa 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb/listener.go +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb/listener.go @@ -551,7 +551,7 @@ type Listener struct { MutualAuthentication ListenerMutualAuthenticationOutput `pulumi:"mutualAuthentication"` // Port on which the load balancer is listening. Not valid for Gateway Load Balancers. Port pulumi.IntPtrOutput `pulumi:"port"` - // Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, and `TCP_UDP`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid for Gateway Load Balancers. + // Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, `TCP_UDP`, `QUIC`, and `TCP_QUIC`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid to use `QUIC` or `TCP_QUIC` if security groups are configured or dual-stack mode is enabled. Not valid for Gateway Load Balancers. Protocol pulumi.StringOutput `pulumi:"protocol"` // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region pulumi.StringOutput `pulumi:"region"` @@ -663,7 +663,7 @@ type listenerState struct { MutualAuthentication *ListenerMutualAuthentication `pulumi:"mutualAuthentication"` // Port on which the load balancer is listening. Not valid for Gateway Load Balancers. Port *int `pulumi:"port"` - // Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, and `TCP_UDP`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid for Gateway Load Balancers. + // Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, `TCP_UDP`, `QUIC`, and `TCP_QUIC`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid to use `QUIC` or `TCP_QUIC` if security groups are configured or dual-stack mode is enabled. Not valid for Gateway Load Balancers. Protocol *string `pulumi:"protocol"` // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region *string `pulumi:"region"` @@ -734,7 +734,7 @@ type ListenerState struct { MutualAuthentication ListenerMutualAuthenticationPtrInput // Port on which the load balancer is listening. Not valid for Gateway Load Balancers. Port pulumi.IntPtrInput - // Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, and `TCP_UDP`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid for Gateway Load Balancers. + // Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, `TCP_UDP`, `QUIC`, and `TCP_QUIC`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid to use `QUIC` or `TCP_QUIC` if security groups are configured or dual-stack mode is enabled. Not valid for Gateway Load Balancers. Protocol pulumi.StringPtrInput // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region pulumi.StringPtrInput @@ -807,7 +807,7 @@ type listenerArgs struct { MutualAuthentication *ListenerMutualAuthentication `pulumi:"mutualAuthentication"` // Port on which the load balancer is listening. Not valid for Gateway Load Balancers. Port *int `pulumi:"port"` - // Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, and `TCP_UDP`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid for Gateway Load Balancers. + // Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, `TCP_UDP`, `QUIC`, and `TCP_QUIC`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid to use `QUIC` or `TCP_QUIC` if security groups are configured or dual-stack mode is enabled. Not valid for Gateway Load Balancers. Protocol *string `pulumi:"protocol"` // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region *string `pulumi:"region"` @@ -875,7 +875,7 @@ type ListenerArgs struct { MutualAuthentication ListenerMutualAuthenticationPtrInput // Port on which the load balancer is listening. Not valid for Gateway Load Balancers. Port pulumi.IntPtrInput - // Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, and `TCP_UDP`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid for Gateway Load Balancers. + // Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, `TCP_UDP`, `QUIC`, and `TCP_QUIC`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid to use `QUIC` or `TCP_QUIC` if security groups are configured or dual-stack mode is enabled. Not valid for Gateway Load Balancers. Protocol pulumi.StringPtrInput // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region pulumi.StringPtrInput @@ -1051,7 +1051,7 @@ func (o ListenerOutput) Port() pulumi.IntPtrOutput { return o.ApplyT(func(v *Listener) pulumi.IntPtrOutput { return v.Port }).(pulumi.IntPtrOutput) } -// Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, and `TCP_UDP`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid for Gateway Load Balancers. +// Protocol for connections from clients to the load balancer. For Application Load Balancers, valid values are `HTTP` and `HTTPS`, with a default of `HTTP`. For Network Load Balancers, valid values are `TCP`, `TLS`, `UDP`, `TCP_UDP`, `QUIC`, and `TCP_QUIC`. Not valid to use `UDP` or `TCP_UDP` if dual-stack mode is enabled. Not valid to use `QUIC` or `TCP_QUIC` if security groups are configured or dual-stack mode is enabled. Not valid for Gateway Load Balancers. func (o ListenerOutput) Protocol() pulumi.StringOutput { return o.ApplyT(func(v *Listener) pulumi.StringOutput { return v.Protocol }).(pulumi.StringOutput) } diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb/targetGroup.go b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb/targetGroup.go index a23665394..37f20dd16 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb/targetGroup.go +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb/targetGroup.go @@ -265,7 +265,7 @@ type TargetGroup struct { // Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information. PreserveClientIp pulumi.StringOutput `pulumi:"preserveClientIp"` // Protocol to use for routing traffic to the targets. - // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. + // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, `UDP`, `QUIC`, or `TCP_QUIC`. // Required when `targetType` is `instance`, `ip`, or `alb`. // Does not apply when `targetType` is `lambda`. Protocol pulumi.StringPtrOutput `pulumi:"protocol"` @@ -374,7 +374,7 @@ type targetGroupState struct { // Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information. PreserveClientIp *string `pulumi:"preserveClientIp"` // Protocol to use for routing traffic to the targets. - // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. + // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, `UDP`, `QUIC`, or `TCP_QUIC`. // Required when `targetType` is `instance`, `ip`, or `alb`. // Does not apply when `targetType` is `lambda`. Protocol *string `pulumi:"protocol"` @@ -448,7 +448,7 @@ type TargetGroupState struct { // Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information. PreserveClientIp pulumi.StringPtrInput // Protocol to use for routing traffic to the targets. - // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. + // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, `UDP`, `QUIC`, or `TCP_QUIC`. // Required when `targetType` is `instance`, `ip`, or `alb`. // Does not apply when `targetType` is `lambda`. Protocol pulumi.StringPtrInput @@ -520,7 +520,7 @@ type targetGroupArgs struct { // Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information. PreserveClientIp *string `pulumi:"preserveClientIp"` // Protocol to use for routing traffic to the targets. - // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. + // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, `UDP`, `QUIC`, or `TCP_QUIC`. // Required when `targetType` is `instance`, `ip`, or `alb`. // Does not apply when `targetType` is `lambda`. Protocol *string `pulumi:"protocol"` @@ -587,7 +587,7 @@ type TargetGroupArgs struct { // Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information. PreserveClientIp pulumi.StringPtrInput // Protocol to use for routing traffic to the targets. - // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. + // Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, `UDP`, `QUIC`, or `TCP_QUIC`. // Required when `targetType` is `instance`, `ip`, or `alb`. // Does not apply when `targetType` is `lambda`. Protocol pulumi.StringPtrInput @@ -790,7 +790,7 @@ func (o TargetGroupOutput) PreserveClientIp() pulumi.StringOutput { } // Protocol to use for routing traffic to the targets. -// Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. +// Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, `UDP`, `QUIC`, or `TCP_QUIC`. // Required when `targetType` is `instance`, `ip`, or `alb`. // Does not apply when `targetType` is `lambda`. func (o TargetGroupOutput) Protocol() pulumi.StringPtrOutput { diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb/targetGroupAttachment.go b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb/targetGroupAttachment.go index bd9c2229a..4c3c969ac 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb/targetGroupAttachment.go +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb/targetGroupAttachment.go @@ -106,6 +106,48 @@ import ( // // ``` // +// ### Target using QUIC +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2" +// "github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// test, err := lb.NewTargetGroup(ctx, "test", &lb.TargetGroupArgs{ +// Name: pulumi.String("test"), +// Port: pulumi.Int(443), +// Protocol: pulumi.String("QUIC"), +// }) +// if err != nil { +// return err +// } +// testInstance, err := ec2.NewInstance(ctx, "test", nil) +// if err != nil { +// return err +// } +// _, err = lb.NewTargetGroupAttachment(ctx, "test", &lb.TargetGroupAttachmentArgs{ +// TargetGroupArn: test.Arn, +// TargetId: testInstance.ID(), +// Port: pulumi.Int(443), +// QuicServerId: pulumi.String("0x1a2b3c4d5e6f7a8b"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // // You cannot import Target Group Attachments. @@ -116,6 +158,8 @@ type TargetGroupAttachment struct { AvailabilityZone pulumi.StringPtrOutput `pulumi:"availabilityZone"` // The port on which targets receive traffic. Port pulumi.IntPtrOutput `pulumi:"port"` + // Server ID for the targets, consisting of the 0x prefix followed by 16 hexadecimal characters. The value must be unique at the listener level. Required if `lb.TargetGroup` protocol is `QUIC` or `TCP_QUIC`. Not valid with other protocols. Forces replacement if modified. + QuicServerId pulumi.StringPtrOutput `pulumi:"quicServerId"` // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region pulumi.StringOutput `pulumi:"region"` // The ARN of the target group with which to register targets. @@ -172,6 +216,8 @@ type targetGroupAttachmentState struct { AvailabilityZone *string `pulumi:"availabilityZone"` // The port on which targets receive traffic. Port *int `pulumi:"port"` + // Server ID for the targets, consisting of the 0x prefix followed by 16 hexadecimal characters. The value must be unique at the listener level. Required if `lb.TargetGroup` protocol is `QUIC` or `TCP_QUIC`. Not valid with other protocols. Forces replacement if modified. + QuicServerId *string `pulumi:"quicServerId"` // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region *string `pulumi:"region"` // The ARN of the target group with which to register targets. @@ -187,6 +233,8 @@ type TargetGroupAttachmentState struct { AvailabilityZone pulumi.StringPtrInput // The port on which targets receive traffic. Port pulumi.IntPtrInput + // Server ID for the targets, consisting of the 0x prefix followed by 16 hexadecimal characters. The value must be unique at the listener level. Required if `lb.TargetGroup` protocol is `QUIC` or `TCP_QUIC`. Not valid with other protocols. Forces replacement if modified. + QuicServerId pulumi.StringPtrInput // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region pulumi.StringPtrInput // The ARN of the target group with which to register targets. @@ -206,6 +254,8 @@ type targetGroupAttachmentArgs struct { AvailabilityZone *string `pulumi:"availabilityZone"` // The port on which targets receive traffic. Port *int `pulumi:"port"` + // Server ID for the targets, consisting of the 0x prefix followed by 16 hexadecimal characters. The value must be unique at the listener level. Required if `lb.TargetGroup` protocol is `QUIC` or `TCP_QUIC`. Not valid with other protocols. Forces replacement if modified. + QuicServerId *string `pulumi:"quicServerId"` // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region *string `pulumi:"region"` // The ARN of the target group with which to register targets. @@ -222,6 +272,8 @@ type TargetGroupAttachmentArgs struct { AvailabilityZone pulumi.StringPtrInput // The port on which targets receive traffic. Port pulumi.IntPtrInput + // Server ID for the targets, consisting of the 0x prefix followed by 16 hexadecimal characters. The value must be unique at the listener level. Required if `lb.TargetGroup` protocol is `QUIC` or `TCP_QUIC`. Not valid with other protocols. Forces replacement if modified. + QuicServerId pulumi.StringPtrInput // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. Region pulumi.StringPtrInput // The ARN of the target group with which to register targets. @@ -329,6 +381,11 @@ func (o TargetGroupAttachmentOutput) Port() pulumi.IntPtrOutput { return o.ApplyT(func(v *TargetGroupAttachment) pulumi.IntPtrOutput { return v.Port }).(pulumi.IntPtrOutput) } +// Server ID for the targets, consisting of the 0x prefix followed by 16 hexadecimal characters. The value must be unique at the listener level. Required if `lb.TargetGroup` protocol is `QUIC` or `TCP_QUIC`. Not valid with other protocols. Forces replacement if modified. +func (o TargetGroupAttachmentOutput) QuicServerId() pulumi.StringPtrOutput { + return o.ApplyT(func(v *TargetGroupAttachment) pulumi.StringPtrOutput { return v.QuicServerId }).(pulumi.StringPtrOutput) +} + // Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. func (o TargetGroupAttachmentOutput) Region() pulumi.StringOutput { return o.ApplyT(func(v *TargetGroupAttachment) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput) diff --git a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/pulumi-plugin.json b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/pulumi-plugin.json index 5ecd91447..9fc9aa02e 100644 --- a/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/pulumi-plugin.json +++ b/vendor/github.com/pulumi/pulumi-aws/sdk/v7/go/aws/pulumi-plugin.json @@ -1,5 +1,5 @@ { "resource": true, "name": "aws", - "version": "7.15.0" + "version": "7.16.0" } diff --git a/vendor/github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/pulumi-plugin.json b/vendor/github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/pulumi-plugin.json index 74309078d..cfec03a79 100644 --- a/vendor/github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/pulumi-plugin.json +++ b/vendor/github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/pulumi-plugin.json @@ -1,5 +1,5 @@ { "resource": true, "name": "kubernetes", - "version": "4.24.1" + "version": "4.25.0" } diff --git a/vendor/github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/utilities/pulumiUtilities.go b/vendor/github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/utilities/pulumiUtilities.go index df68c460c..31cdd464e 100644 --- a/vendor/github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/utilities/pulumiUtilities.go +++ b/vendor/github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/utilities/pulumiUtilities.go @@ -165,7 +165,7 @@ func callPlainInner( func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { defaults := []pulumi.ResourceOption{} - version := semver.MustParse("4.24.1") + version := semver.MustParse("4.25.0") 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("4.24.1") + version := semver.MustParse("4.25.0") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } diff --git a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/init.go b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/init.go index a5f3c0adc..f63785fe3 100644 --- a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/init.go +++ b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/init.go @@ -35,6 +35,10 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &RandomShuffle{} case "random:index/randomString:RandomString": r = &RandomString{} + case "random:index/randomUuid4:RandomUuid4": + r = &RandomUuid4{} + case "random:index/randomUuid7:RandomUuid7": + r = &RandomUuid7{} case "random:index/randomUuid:RandomUuid": r = &RandomUuid{} default: @@ -108,6 +112,16 @@ func init() { "index/randomUuid", &module{version}, ) + pulumi.RegisterResourceModule( + "random", + "index/randomUuid4", + &module{version}, + ) + pulumi.RegisterResourceModule( + "random", + "index/randomUuid7", + &module{version}, + ) pulumi.RegisterResourcePackage( "random", &pkg{version}, diff --git a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/internal/pulumiUtilities.go b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/internal/pulumiUtilities.go index 11ebff94c..3f67018f4 100644 --- a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/internal/pulumiUtilities.go +++ b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/internal/pulumiUtilities.go @@ -165,7 +165,7 @@ func callPlainInner( func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { defaults := []pulumi.ResourceOption{} - version := semver.MustParse("4.18.5") + version := semver.MustParse("4.19.0") 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("4.18.5") + version := semver.MustParse("4.19.0") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } diff --git a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/pulumi-plugin.json b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/pulumi-plugin.json index d67fef93e..62d52d229 100644 --- a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/pulumi-plugin.json +++ b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/pulumi-plugin.json @@ -1,5 +1,5 @@ { "resource": true, "name": "random", - "version": "4.18.5" + "version": "4.19.0" } diff --git a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomBytes.go b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomBytes.go index 9853e8a2e..d0f558aff 100644 --- a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomBytes.go +++ b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomBytes.go @@ -53,6 +53,8 @@ import ( // // ## Import // +// The `pulumi import` command can be used, for example: +// // Random bytes can be imported by specifying the value as base64 string. // // ```sh diff --git a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomId.go b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomId.go index 9fdc7e9fb..612b1a81c 100644 --- a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomId.go +++ b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomId.go @@ -72,6 +72,8 @@ import ( // // ## Import // +// The `pulumi import` command can be used, for example: +// // Random IDs can be imported using the b64_url with an optional prefix. This // // can be used to replace a config value with a value interpolated from the diff --git a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomInteger.go b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomInteger.go index 1b2d71f69..a4f45042e 100644 --- a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomInteger.go +++ b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomInteger.go @@ -64,6 +64,8 @@ import ( // // ## Import // +// The `pulumi import` command can be used, for example: +// // # Random integers can be imported using the result, min, and max, with an // // optional seed. This can be used to replace a config value with a value diff --git a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomUuid.go b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomUuid.go index d860bd751..9a65c92e7 100644 --- a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomUuid.go +++ b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomUuid.go @@ -48,6 +48,8 @@ import ( // // ## Import // +// The `pulumi import` command can be used, for example: +// // Random UUID's can be imported. This can be used to replace a config // // value with a value interpolated from the random provider without diff --git a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomUuid4.go b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomUuid4.go new file mode 100644 index 000000000..8ba8fb65a --- /dev/null +++ b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomUuid4.go @@ -0,0 +1,277 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package random + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-random/sdk/v4/go/random/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// The resource `RandomUuid4` generates a random version 4 uuid string that is intended to be used as a unique identifier for other resources. +// +// This resource uses [google/uuid](https://github.com/google/uuid) to generate a valid V4 UUID for use with services needing a unique string identifier. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "fmt" +// +// "github.com/pulumi/pulumi-azurerm/sdk/go/azurerm" +// "github.com/pulumi/pulumi-random/sdk/v4/go/random" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// // The following example shows how to generate a unique name for an Azure Resource Group. +// test, err := random.NewRandomUuid4(ctx, "test", nil) +// if err != nil { +// return err +// } +// _, err = azurerm.NewResourceGroup(ctx, "test", &azurerm.ResourceGroupArgs{ +// Name: pulumi.Sprintf("%v-rg", test.Result), +// Location: "Central US", +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// The `pulumi import` command can be used, for example: +// +// Random UUID's can be imported. This can be used to replace a config +// +// value with a value interpolated from the random provider without +// +// experiencing diffs. +// +// ```sh +// $ pulumi import random:index/randomUuid4:RandomUuid4 main 7e4436da-7c71-486e-a57c-830b25fff7bd +// ``` +type RandomUuid4 struct { + pulumi.CustomResourceState + + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapOutput `pulumi:"keepers"` + // The generated uuid presented in string format. + Result pulumi.StringOutput `pulumi:"result"` +} + +// NewRandomUuid4 registers a new resource with the given unique name, arguments, and options. +func NewRandomUuid4(ctx *pulumi.Context, + name string, args *RandomUuid4Args, opts ...pulumi.ResourceOption) (*RandomUuid4, error) { + if args == nil { + args = &RandomUuid4Args{} + } + + opts = internal.PkgResourceDefaultOpts(opts) + var resource RandomUuid4 + err := ctx.RegisterResource("random:index/randomUuid4:RandomUuid4", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetRandomUuid4 gets an existing RandomUuid4 resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetRandomUuid4(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *RandomUuid4State, opts ...pulumi.ResourceOption) (*RandomUuid4, error) { + var resource RandomUuid4 + err := ctx.ReadResource("random:index/randomUuid4:RandomUuid4", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering RandomUuid4 resources. +type randomUuid4State struct { + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` + // The generated uuid presented in string format. + Result *string `pulumi:"result"` +} + +type RandomUuid4State struct { + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput + // The generated uuid presented in string format. + Result pulumi.StringPtrInput +} + +func (RandomUuid4State) ElementType() reflect.Type { + return reflect.TypeOf((*randomUuid4State)(nil)).Elem() +} + +type randomUuid4Args struct { + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` +} + +// The set of arguments for constructing a RandomUuid4 resource. +type RandomUuid4Args struct { + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput +} + +func (RandomUuid4Args) ElementType() reflect.Type { + return reflect.TypeOf((*randomUuid4Args)(nil)).Elem() +} + +type RandomUuid4Input interface { + pulumi.Input + + ToRandomUuid4Output() RandomUuid4Output + ToRandomUuid4OutputWithContext(ctx context.Context) RandomUuid4Output +} + +func (*RandomUuid4) ElementType() reflect.Type { + return reflect.TypeOf((**RandomUuid4)(nil)).Elem() +} + +func (i *RandomUuid4) ToRandomUuid4Output() RandomUuid4Output { + return i.ToRandomUuid4OutputWithContext(context.Background()) +} + +func (i *RandomUuid4) ToRandomUuid4OutputWithContext(ctx context.Context) RandomUuid4Output { + return pulumi.ToOutputWithContext(ctx, i).(RandomUuid4Output) +} + +// RandomUuid4ArrayInput is an input type that accepts RandomUuid4Array and RandomUuid4ArrayOutput values. +// You can construct a concrete instance of `RandomUuid4ArrayInput` via: +// +// RandomUuid4Array{ RandomUuid4Args{...} } +type RandomUuid4ArrayInput interface { + pulumi.Input + + ToRandomUuid4ArrayOutput() RandomUuid4ArrayOutput + ToRandomUuid4ArrayOutputWithContext(context.Context) RandomUuid4ArrayOutput +} + +type RandomUuid4Array []RandomUuid4Input + +func (RandomUuid4Array) ElementType() reflect.Type { + return reflect.TypeOf((*[]*RandomUuid4)(nil)).Elem() +} + +func (i RandomUuid4Array) ToRandomUuid4ArrayOutput() RandomUuid4ArrayOutput { + return i.ToRandomUuid4ArrayOutputWithContext(context.Background()) +} + +func (i RandomUuid4Array) ToRandomUuid4ArrayOutputWithContext(ctx context.Context) RandomUuid4ArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(RandomUuid4ArrayOutput) +} + +// RandomUuid4MapInput is an input type that accepts RandomUuid4Map and RandomUuid4MapOutput values. +// You can construct a concrete instance of `RandomUuid4MapInput` via: +// +// RandomUuid4Map{ "key": RandomUuid4Args{...} } +type RandomUuid4MapInput interface { + pulumi.Input + + ToRandomUuid4MapOutput() RandomUuid4MapOutput + ToRandomUuid4MapOutputWithContext(context.Context) RandomUuid4MapOutput +} + +type RandomUuid4Map map[string]RandomUuid4Input + +func (RandomUuid4Map) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*RandomUuid4)(nil)).Elem() +} + +func (i RandomUuid4Map) ToRandomUuid4MapOutput() RandomUuid4MapOutput { + return i.ToRandomUuid4MapOutputWithContext(context.Background()) +} + +func (i RandomUuid4Map) ToRandomUuid4MapOutputWithContext(ctx context.Context) RandomUuid4MapOutput { + return pulumi.ToOutputWithContext(ctx, i).(RandomUuid4MapOutput) +} + +type RandomUuid4Output struct{ *pulumi.OutputState } + +func (RandomUuid4Output) ElementType() reflect.Type { + return reflect.TypeOf((**RandomUuid4)(nil)).Elem() +} + +func (o RandomUuid4Output) ToRandomUuid4Output() RandomUuid4Output { + return o +} + +func (o RandomUuid4Output) ToRandomUuid4OutputWithContext(ctx context.Context) RandomUuid4Output { + return o +} + +// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. +func (o RandomUuid4Output) Keepers() pulumi.StringMapOutput { + return o.ApplyT(func(v *RandomUuid4) pulumi.StringMapOutput { return v.Keepers }).(pulumi.StringMapOutput) +} + +// The generated uuid presented in string format. +func (o RandomUuid4Output) Result() pulumi.StringOutput { + return o.ApplyT(func(v *RandomUuid4) pulumi.StringOutput { return v.Result }).(pulumi.StringOutput) +} + +type RandomUuid4ArrayOutput struct{ *pulumi.OutputState } + +func (RandomUuid4ArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*RandomUuid4)(nil)).Elem() +} + +func (o RandomUuid4ArrayOutput) ToRandomUuid4ArrayOutput() RandomUuid4ArrayOutput { + return o +} + +func (o RandomUuid4ArrayOutput) ToRandomUuid4ArrayOutputWithContext(ctx context.Context) RandomUuid4ArrayOutput { + return o +} + +func (o RandomUuid4ArrayOutput) Index(i pulumi.IntInput) RandomUuid4Output { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RandomUuid4 { + return vs[0].([]*RandomUuid4)[vs[1].(int)] + }).(RandomUuid4Output) +} + +type RandomUuid4MapOutput struct{ *pulumi.OutputState } + +func (RandomUuid4MapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*RandomUuid4)(nil)).Elem() +} + +func (o RandomUuid4MapOutput) ToRandomUuid4MapOutput() RandomUuid4MapOutput { + return o +} + +func (o RandomUuid4MapOutput) ToRandomUuid4MapOutputWithContext(ctx context.Context) RandomUuid4MapOutput { + return o +} + +func (o RandomUuid4MapOutput) MapIndex(k pulumi.StringInput) RandomUuid4Output { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RandomUuid4 { + return vs[0].(map[string]*RandomUuid4)[vs[1].(string)] + }).(RandomUuid4Output) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*RandomUuid4Input)(nil)).Elem(), &RandomUuid4{}) + pulumi.RegisterInputType(reflect.TypeOf((*RandomUuid4ArrayInput)(nil)).Elem(), RandomUuid4Array{}) + pulumi.RegisterInputType(reflect.TypeOf((*RandomUuid4MapInput)(nil)).Elem(), RandomUuid4Map{}) + pulumi.RegisterOutputType(RandomUuid4Output{}) + pulumi.RegisterOutputType(RandomUuid4ArrayOutput{}) + pulumi.RegisterOutputType(RandomUuid4MapOutput{}) +} diff --git a/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomUuid7.go b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomUuid7.go new file mode 100644 index 000000000..7150148b1 --- /dev/null +++ b/vendor/github.com/pulumi/pulumi-random/sdk/v4/go/random/randomUuid7.go @@ -0,0 +1,277 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package random + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-random/sdk/v4/go/random/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// The resource `RandomUuid7` generates a random version 7 uuid string that is intended to be used as a unique identifier for other resources. +// +// This resource uses [google/uuid](https://github.com/google/uuid) to generate a valid V7 UUID for use with services needing a unique string identifier. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "fmt" +// +// "github.com/pulumi/pulumi-azurerm/sdk/go/azurerm" +// "github.com/pulumi/pulumi-random/sdk/v4/go/random" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// // The following example shows how to generate a unique name for an Azure Resource Group. +// test, err := random.NewRandomUuid7(ctx, "test", nil) +// if err != nil { +// return err +// } +// _, err = azurerm.NewResourceGroup(ctx, "test", &azurerm.ResourceGroupArgs{ +// Name: pulumi.Sprintf("%v-rg", test.Result), +// Location: "Central US", +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// The `pulumi import` command can be used, for example: +// +// Random UUID's can be imported. This can be used to replace a config +// +// value with a value interpolated from the random provider without +// +// experiencing diffs. +// +// ```sh +// $ pulumi import random:index/randomUuid7:RandomUuid7 main 0197ad85-fe6e-7e92-a2f5-7550daa83030 +// ``` +type RandomUuid7 struct { + pulumi.CustomResourceState + + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapOutput `pulumi:"keepers"` + // The generated uuid presented in string format. + Result pulumi.StringOutput `pulumi:"result"` +} + +// NewRandomUuid7 registers a new resource with the given unique name, arguments, and options. +func NewRandomUuid7(ctx *pulumi.Context, + name string, args *RandomUuid7Args, opts ...pulumi.ResourceOption) (*RandomUuid7, error) { + if args == nil { + args = &RandomUuid7Args{} + } + + opts = internal.PkgResourceDefaultOpts(opts) + var resource RandomUuid7 + err := ctx.RegisterResource("random:index/randomUuid7:RandomUuid7", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetRandomUuid7 gets an existing RandomUuid7 resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetRandomUuid7(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *RandomUuid7State, opts ...pulumi.ResourceOption) (*RandomUuid7, error) { + var resource RandomUuid7 + err := ctx.ReadResource("random:index/randomUuid7:RandomUuid7", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering RandomUuid7 resources. +type randomUuid7State struct { + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` + // The generated uuid presented in string format. + Result *string `pulumi:"result"` +} + +type RandomUuid7State struct { + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput + // The generated uuid presented in string format. + Result pulumi.StringPtrInput +} + +func (RandomUuid7State) ElementType() reflect.Type { + return reflect.TypeOf((*randomUuid7State)(nil)).Elem() +} + +type randomUuid7Args struct { + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` +} + +// The set of arguments for constructing a RandomUuid7 resource. +type RandomUuid7Args struct { + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput +} + +func (RandomUuid7Args) ElementType() reflect.Type { + return reflect.TypeOf((*randomUuid7Args)(nil)).Elem() +} + +type RandomUuid7Input interface { + pulumi.Input + + ToRandomUuid7Output() RandomUuid7Output + ToRandomUuid7OutputWithContext(ctx context.Context) RandomUuid7Output +} + +func (*RandomUuid7) ElementType() reflect.Type { + return reflect.TypeOf((**RandomUuid7)(nil)).Elem() +} + +func (i *RandomUuid7) ToRandomUuid7Output() RandomUuid7Output { + return i.ToRandomUuid7OutputWithContext(context.Background()) +} + +func (i *RandomUuid7) ToRandomUuid7OutputWithContext(ctx context.Context) RandomUuid7Output { + return pulumi.ToOutputWithContext(ctx, i).(RandomUuid7Output) +} + +// RandomUuid7ArrayInput is an input type that accepts RandomUuid7Array and RandomUuid7ArrayOutput values. +// You can construct a concrete instance of `RandomUuid7ArrayInput` via: +// +// RandomUuid7Array{ RandomUuid7Args{...} } +type RandomUuid7ArrayInput interface { + pulumi.Input + + ToRandomUuid7ArrayOutput() RandomUuid7ArrayOutput + ToRandomUuid7ArrayOutputWithContext(context.Context) RandomUuid7ArrayOutput +} + +type RandomUuid7Array []RandomUuid7Input + +func (RandomUuid7Array) ElementType() reflect.Type { + return reflect.TypeOf((*[]*RandomUuid7)(nil)).Elem() +} + +func (i RandomUuid7Array) ToRandomUuid7ArrayOutput() RandomUuid7ArrayOutput { + return i.ToRandomUuid7ArrayOutputWithContext(context.Background()) +} + +func (i RandomUuid7Array) ToRandomUuid7ArrayOutputWithContext(ctx context.Context) RandomUuid7ArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(RandomUuid7ArrayOutput) +} + +// RandomUuid7MapInput is an input type that accepts RandomUuid7Map and RandomUuid7MapOutput values. +// You can construct a concrete instance of `RandomUuid7MapInput` via: +// +// RandomUuid7Map{ "key": RandomUuid7Args{...} } +type RandomUuid7MapInput interface { + pulumi.Input + + ToRandomUuid7MapOutput() RandomUuid7MapOutput + ToRandomUuid7MapOutputWithContext(context.Context) RandomUuid7MapOutput +} + +type RandomUuid7Map map[string]RandomUuid7Input + +func (RandomUuid7Map) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*RandomUuid7)(nil)).Elem() +} + +func (i RandomUuid7Map) ToRandomUuid7MapOutput() RandomUuid7MapOutput { + return i.ToRandomUuid7MapOutputWithContext(context.Background()) +} + +func (i RandomUuid7Map) ToRandomUuid7MapOutputWithContext(ctx context.Context) RandomUuid7MapOutput { + return pulumi.ToOutputWithContext(ctx, i).(RandomUuid7MapOutput) +} + +type RandomUuid7Output struct{ *pulumi.OutputState } + +func (RandomUuid7Output) ElementType() reflect.Type { + return reflect.TypeOf((**RandomUuid7)(nil)).Elem() +} + +func (o RandomUuid7Output) ToRandomUuid7Output() RandomUuid7Output { + return o +} + +func (o RandomUuid7Output) ToRandomUuid7OutputWithContext(ctx context.Context) RandomUuid7Output { + return o +} + +// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. +func (o RandomUuid7Output) Keepers() pulumi.StringMapOutput { + return o.ApplyT(func(v *RandomUuid7) pulumi.StringMapOutput { return v.Keepers }).(pulumi.StringMapOutput) +} + +// The generated uuid presented in string format. +func (o RandomUuid7Output) Result() pulumi.StringOutput { + return o.ApplyT(func(v *RandomUuid7) pulumi.StringOutput { return v.Result }).(pulumi.StringOutput) +} + +type RandomUuid7ArrayOutput struct{ *pulumi.OutputState } + +func (RandomUuid7ArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*RandomUuid7)(nil)).Elem() +} + +func (o RandomUuid7ArrayOutput) ToRandomUuid7ArrayOutput() RandomUuid7ArrayOutput { + return o +} + +func (o RandomUuid7ArrayOutput) ToRandomUuid7ArrayOutputWithContext(ctx context.Context) RandomUuid7ArrayOutput { + return o +} + +func (o RandomUuid7ArrayOutput) Index(i pulumi.IntInput) RandomUuid7Output { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RandomUuid7 { + return vs[0].([]*RandomUuid7)[vs[1].(int)] + }).(RandomUuid7Output) +} + +type RandomUuid7MapOutput struct{ *pulumi.OutputState } + +func (RandomUuid7MapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*RandomUuid7)(nil)).Elem() +} + +func (o RandomUuid7MapOutput) ToRandomUuid7MapOutput() RandomUuid7MapOutput { + return o +} + +func (o RandomUuid7MapOutput) ToRandomUuid7MapOutputWithContext(ctx context.Context) RandomUuid7MapOutput { + return o +} + +func (o RandomUuid7MapOutput) MapIndex(k pulumi.StringInput) RandomUuid7Output { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RandomUuid7 { + return vs[0].(map[string]*RandomUuid7)[vs[1].(string)] + }).(RandomUuid7Output) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*RandomUuid7Input)(nil)).Elem(), &RandomUuid7{}) + pulumi.RegisterInputType(reflect.TypeOf((*RandomUuid7ArrayInput)(nil)).Elem(), RandomUuid7Array{}) + pulumi.RegisterInputType(reflect.TypeOf((*RandomUuid7MapInput)(nil)).Elem(), RandomUuid7Map{}) + pulumi.RegisterOutputType(RandomUuid7Output{}) + pulumi.RegisterOutputType(RandomUuid7ArrayOutput{}) + pulumi.RegisterOutputType(RandomUuid7MapOutput{}) +} diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/.version b/vendor/github.com/pulumi/pulumi/sdk/v3/.version index 240dd3396..64c3dc6d4 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/.version +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/.version @@ -1 +1 @@ -3.215.0 +3.216.0 diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/host_server.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/host_server.go index 617c2ba7d..4dbbd3dbe 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/host_server.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/host_server.go @@ -1,4 +1,4 @@ -// Copyright 2016-2018, Pulumi Corporation. +// Copyright 2016-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. @@ -25,6 +25,7 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/common/diag" "github.com/pulumi/pulumi/sdk/v3/go/common/resource" "github.com/pulumi/pulumi/sdk/v3/go/common/util/rpcutil" + "github.com/pulumi/pulumi/sdk/v3/go/common/version" pulumirpc "github.com/pulumi/pulumi/sdk/v3/proto/go" ) @@ -148,3 +149,10 @@ func (eng *hostServer) StartDebugging(ctx context.Context, return &emptypb.Empty{}, nil } + +func (eng *hostServer) CheckPulumiVersion(ctx context.Context, + req *pulumirpc.CheckPulumiVersionRequest, +) (*pulumirpc.CheckPulumiVersionResponse, error) { + return &pulumirpc.CheckPulumiVersionResponse{}, + validatePulumiVersionRange(req.PulumiVersionRange, version.Version) +} diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/plugin.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/plugin.go index 69a868abd..77e157190 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/plugin.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin/plugin.go @@ -480,7 +480,7 @@ func ExecPlugin(ctx *Context, bin, prefix string, kind apitype.PluginKind, return nil, errors.New("language plugins must be executable binaries") } - if err := validatePulumiVersionRange(pulumiVersionRange, version.Version, pluginDir); err != nil { + if err := validatePulumiVersionRange(pulumiVersionRange, version.Version); err != nil { return nil, err } @@ -632,7 +632,7 @@ func ExecPlugin(ctx *Context, bin, prefix string, kind apitype.PluginKind, // Ranges can be AND-ed together by concatenating with spaces ">=3.5.0 !3.7.7", meaning greater-or-equal to 3.5.0 and // not exactly 3.7.7. Ranges can be OR-ed with the `||` operator: "<3.4.0 || >3.8.0", meaning less-than 3.4.0 or // greater-than 3.8.0. -func validatePulumiVersionRange(pulumiVersionRange, cliVersion, provider string) error { +func validatePulumiVersionRange(pulumiVersionRange, cliVersion string) error { // The cliVersion is the build version and will usually be set when running the Pulumi CLI, however it may be empty // when running non-integration tests. if pulumiVersionRange != "" && cliVersion != "" { @@ -646,9 +646,7 @@ func validatePulumiVersionRange(pulumiVersionRange, cliVersion, provider string) } if !rg(cliVersion) { return fmt.Errorf( - "Pulumi CLI version %s does not satisfy the version range %q requested by the provider %s.", - cliVersion, pulumiVersionRange, provider, - ) + "Pulumi CLI version %s does not satisfy the version range %q", cliVersion, pulumiVersionRange) } } return nil 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 fac273d1f..59788e3f6 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 @@ -84,14 +84,6 @@ type ProviderHandshakeResponse struct { // True if the provider accepts and respects autonaming configuration that the engine provides on behalf of the // user. SupportsAutonamingConfiguration bool - - // The CLI version range required for this provider to work correctly. Empty if the provider does not have a version - // requirement. - // The supported syntax for ranges is that of https://pkg.go.dev/github.com/blang/semver#ParseRange. For example - // ">=3.0.0", or "!3.1.2". Ranges can be AND-ed together by concatenating with spaces ">=3.5.0 !3.7.7", meaning - // greater-or-equal to 3.5.0 and not exactly 3.7.7. Ranges can be OR-ed with the `||` operator: "<3.4.0 || >3.8.0", - // meaning less-than 3.4.0 or greater-than 3.8.0. - PulumiVersionRange string } // ParameterizeParameters can either be of concrete type ParameterizeArgs or ParameterizeValue, for when parameterizing 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 426683e99..d6e8865dc 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 @@ -48,7 +48,6 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/common/util/logging" "github.com/pulumi/pulumi/sdk/v3/go/common/util/rpcutil" "github.com/pulumi/pulumi/sdk/v3/go/common/util/rpcutil/rpcerror" - "github.com/pulumi/pulumi/sdk/v3/go/common/version" "github.com/pulumi/pulumi/sdk/v3/go/common/workspace" pulumirpc "github.com/pulumi/pulumi/sdk/v3/proto/go" ) @@ -290,11 +289,6 @@ func NewProvider(host Host, ctx *Context, spec workspace.PluginDescriptor, } if handshakeRes != nil { - if err := validatePulumiVersionRange(handshakeRes.PulumiVersionRange, version.Version, string(pkg)); err != nil { - contract.IgnoreClose(p) - return nil, err - } - p.protocol = &pluginProtocol{ acceptSecrets: handshakeRes.AcceptSecrets, acceptResources: handshakeRes.AcceptResources, @@ -348,7 +342,6 @@ func handshake( AcceptResources: res.GetAcceptResources(), AcceptOutputs: res.GetAcceptOutputs(), SupportsAutonamingConfiguration: res.GetSupportsAutonamingConfiguration(), - PulumiVersionRange: res.GetPulumiVersionRange(), }, nil } @@ -417,11 +410,6 @@ func NewProviderFromPath(host Host, ctx *Context, pkg tokens.Package, path strin } if handshakeRes != nil { - if err := validatePulumiVersionRange(handshakeRes.PulumiVersionRange, version.Version, string(pkg)); err != nil { - contract.IgnoreClose(p) - return nil, err - } - p.protocol = &pluginProtocol{ acceptSecrets: handshakeRes.AcceptSecrets, acceptResources: handshakeRes.AcceptResources, @@ -524,7 +512,6 @@ func (p *provider) Handshake(ctx context.Context, req ProviderHandshakeRequest) AcceptResources: res.GetAcceptResources(), AcceptOutputs: res.GetAcceptOutputs(), SupportsAutonamingConfiguration: res.GetSupportsAutonamingConfiguration(), - PulumiVersionRange: res.GetPulumiVersionRange(), }, nil } 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 5b7cdcc7d..62ef2b49a 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 @@ -160,7 +160,6 @@ func (p *providerServer) Handshake( // For features we don't shim, we just pass through the response from the provider as expected. SupportsAutonamingConfiguration: res.SupportsAutonamingConfiguration, - PulumiVersionRange: &res.PulumiVersionRange, }, nil } diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/util/env/env.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/util/env/env.go index 5536eb4cc..eab5678c4 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/util/env/env.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/common/util/env/env.go @@ -24,10 +24,14 @@ package env import ( "fmt" + "iter" + "maps" "os" "sort" "strconv" "strings" + + "github.com/pulumi/pulumi/sdk/v3/go/common/util/contract" ) // Store holds a collection of key, value? pairs. @@ -37,6 +41,8 @@ type Store interface { // Retrieve a raw value from the Store. If the value is not present, "", false should // be returned. Raw(key string) (string, bool) + // Retrieve an iterator for values in the Store. An empty store will result in an empty collection. + Values() iter.Seq2[string, string] } // A strongly typed environment. @@ -44,6 +50,7 @@ type Env interface { GetString(val StringValue) string GetBool(val BoolValue) bool GetInt(val IntValue) int + GetStore() Store } // Create a new strongly typed Env from an untyped Store. @@ -65,12 +72,27 @@ func (e env) GetInt(val IntValue) int { return IntValue{val.withStore(e.s)}.Value() } +func (e env) GetStore() Store { return e.s } + type envStore struct{} func (envStore) Raw(key string) (string, bool) { return os.LookupEnv(key) } +func (envStore) Values() iter.Seq2[string, string] { + return func(yield func(string, string) bool) { + vars := os.Environ() + for _, v := range vars { + parts := strings.SplitN(v, "=", 2) + contract.Assertf(len(parts) == 2, "invalid return value from os.Environ: %q", v) + if !yield(parts[0], parts[1]) { + break + } + } + } +} + type MapStore map[string]string func (m MapStore) Raw(key string) (string, bool) { @@ -78,11 +100,21 @@ func (m MapStore) Raw(key string) (string, bool) { return v, ok } +func (m MapStore) Values() iter.Seq2[string, string] { + return maps.All(m) +} + // The global store of values that Value.Value() uses. // // Setting this value is not thread safe, and should be restricted to testing. var Global Store = envStore{} +// NewEnvStore returns a new Store that reads from the OS environment. +// This is primarily useful for testing. +func NewEnvStore() Store { + return envStore{} +} + // An environmental variable. type Var struct { name string @@ -421,3 +453,36 @@ func Int(name, description string, opts ...Option) IntValue { } return setVar(val, variable).(IntValue) } + +func JoinStore(stores ...Store) Store { + return joinStore{stores} +} + +type joinStore struct{ stores []Store } + +func (js joinStore) Raw(key string) (string, bool) { + for _, store := range js.stores { + if v, ok := store.Raw(key); ok { + return v, true + } + } + return "", false +} + +func (js joinStore) Values() iter.Seq2[string, string] { + seen := map[string]struct{}{} + return func(yield func(string, string) bool) { + for _, store := range js.stores { + for k, v := range store.Values() { + _, duplicate := seen[k] + if duplicate { + continue + } + seen[k] = struct{}{} + if !yield(k, v) { + return + } + } + } + } +} diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/mocks.go b/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/mocks.go index c69b7773f..9e6d1ecdf 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/mocks.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/mocks.go @@ -1,4 +1,4 @@ -// Copyright 2020-2024, Pulumi Corporation. +// Copyright 2020-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. @@ -430,3 +430,9 @@ func (m *mockEngine) StartDebugging(ctx context.Context, in *pulumirpc.StartDebu ) (*emptypb.Empty, error) { return &emptypb.Empty{}, nil } + +func (e *mockEngine) CheckPulumiVersion(ctx context.Context, req *pulumirpc.CheckPulumiVersionRequest, + opts ...grpc.CallOption, +) (*pulumirpc.CheckPulumiVersionResponse, error) { + return &pulumirpc.CheckPulumiVersionResponse{}, nil +} diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/engine.pb.go b/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/engine.pb.go index fd9d8df1e..d2e9af5b9 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/engine.pb.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/engine.pb.go @@ -1,4 +1,4 @@ -// Copyright 2016-2018, Pulumi Corporation. +// Copyright 2016-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. @@ -393,6 +393,91 @@ func (x *StartDebuggingRequest) GetMessage() string { return "" } +type CheckPulumiVersionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A version range to check against the engine (CLI) version. If the version is not compatible with the specified + // range, an error is returned. The supported syntax for ranges is that of + // https://pkg.go.dev/github.com/blang/semver#ParseRange. For example ">=3.0.0", or "!3.1.2". Ranges can be AND-ed + // together by concatenating with spaces ">=3.5.0 !3.7.7", meaning greater-or-equal to 3.5.0 and not exactly 3.7.7. + // Ranges can be OR-ed with the `||` operator: "<3.4.0 || >3.8.0", meaning less-than 3.4.0 or greater-than 3.8.0. + PulumiVersionRange string `protobuf:"bytes,1,opt,name=pulumi_version_range,json=pulumiVersionRange,proto3" json:"pulumi_version_range,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckPulumiVersionRequest) Reset() { + *x = CheckPulumiVersionRequest{} + mi := &file_pulumi_engine_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckPulumiVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckPulumiVersionRequest) ProtoMessage() {} + +func (x *CheckPulumiVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_pulumi_engine_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckPulumiVersionRequest.ProtoReflect.Descriptor instead. +func (*CheckPulumiVersionRequest) Descriptor() ([]byte, []int) { + return file_pulumi_engine_proto_rawDescGZIP(), []int{6} +} + +func (x *CheckPulumiVersionRequest) GetPulumiVersionRange() string { + if x != nil { + return x.PulumiVersionRange + } + return "" +} + +type CheckPulumiVersionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckPulumiVersionResponse) Reset() { + *x = CheckPulumiVersionResponse{} + mi := &file_pulumi_engine_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckPulumiVersionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckPulumiVersionResponse) ProtoMessage() {} + +func (x *CheckPulumiVersionResponse) ProtoReflect() protoreflect.Message { + mi := &file_pulumi_engine_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckPulumiVersionResponse.ProtoReflect.Descriptor instead. +func (*CheckPulumiVersionResponse) Descriptor() ([]byte, []int) { + return file_pulumi_engine_proto_rawDescGZIP(), []int{7} +} + var File_pulumi_engine_proto protoreflect.FileDescriptor const file_pulumi_engine_proto_rawDesc = "" + @@ -413,17 +498,21 @@ const file_pulumi_engine_proto_rawDesc = "" + "\x17SetRootResourceResponse\"b\n" + "\x15StartDebuggingRequest\x12/\n" + "\x06config\x18\x01 \x01(\v2\x17.google.protobuf.StructR\x06config\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessage*:\n" + + "\amessage\x18\x02 \x01(\tR\amessage\"M\n" + + "\x19CheckPulumiVersionRequest\x120\n" + + "\x14pulumi_version_range\x18\x01 \x01(\tR\x12pulumiVersionRange\"\x1c\n" + + "\x1aCheckPulumiVersionResponse*:\n" + "\vLogSeverity\x12\t\n" + "\x05DEBUG\x10\x00\x12\b\n" + "\x04INFO\x10\x01\x12\v\n" + "\aWARNING\x10\x02\x12\t\n" + - "\x05ERROR\x10\x032\xc6\x02\n" + + "\x05ERROR\x10\x032\xab\x03\n" + "\x06Engine\x126\n" + "\x03Log\x12\x15.pulumirpc.LogRequest\x1a\x16.google.protobuf.Empty\"\x00\x12Z\n" + "\x0fGetRootResource\x12!.pulumirpc.GetRootResourceRequest\x1a\".pulumirpc.GetRootResourceResponse\"\x00\x12Z\n" + "\x0fSetRootResource\x12!.pulumirpc.SetRootResourceRequest\x1a\".pulumirpc.SetRootResourceResponse\"\x00\x12L\n" + - "\x0eStartDebugging\x12 .pulumirpc.StartDebuggingRequest\x1a\x16.google.protobuf.Empty\"\x00B4Z2github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpcb\x06proto3" + "\x0eStartDebugging\x12 .pulumirpc.StartDebuggingRequest\x1a\x16.google.protobuf.Empty\"\x00\x12c\n" + + "\x12CheckPulumiVersion\x12$.pulumirpc.CheckPulumiVersionRequest\x1a%.pulumirpc.CheckPulumiVersionResponse\"\x00B4Z2github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpcb\x06proto3" var ( file_pulumi_engine_proto_rawDescOnce sync.Once @@ -438,34 +527,38 @@ func file_pulumi_engine_proto_rawDescGZIP() []byte { } var file_pulumi_engine_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pulumi_engine_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_pulumi_engine_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_pulumi_engine_proto_goTypes = []any{ - (LogSeverity)(0), // 0: pulumirpc.LogSeverity - (*LogRequest)(nil), // 1: pulumirpc.LogRequest - (*GetRootResourceRequest)(nil), // 2: pulumirpc.GetRootResourceRequest - (*GetRootResourceResponse)(nil), // 3: pulumirpc.GetRootResourceResponse - (*SetRootResourceRequest)(nil), // 4: pulumirpc.SetRootResourceRequest - (*SetRootResourceResponse)(nil), // 5: pulumirpc.SetRootResourceResponse - (*StartDebuggingRequest)(nil), // 6: pulumirpc.StartDebuggingRequest - (*structpb.Struct)(nil), // 7: google.protobuf.Struct - (*emptypb.Empty)(nil), // 8: google.protobuf.Empty + (LogSeverity)(0), // 0: pulumirpc.LogSeverity + (*LogRequest)(nil), // 1: pulumirpc.LogRequest + (*GetRootResourceRequest)(nil), // 2: pulumirpc.GetRootResourceRequest + (*GetRootResourceResponse)(nil), // 3: pulumirpc.GetRootResourceResponse + (*SetRootResourceRequest)(nil), // 4: pulumirpc.SetRootResourceRequest + (*SetRootResourceResponse)(nil), // 5: pulumirpc.SetRootResourceResponse + (*StartDebuggingRequest)(nil), // 6: pulumirpc.StartDebuggingRequest + (*CheckPulumiVersionRequest)(nil), // 7: pulumirpc.CheckPulumiVersionRequest + (*CheckPulumiVersionResponse)(nil), // 8: pulumirpc.CheckPulumiVersionResponse + (*structpb.Struct)(nil), // 9: google.protobuf.Struct + (*emptypb.Empty)(nil), // 10: google.protobuf.Empty } var file_pulumi_engine_proto_depIdxs = []int32{ - 0, // 0: pulumirpc.LogRequest.severity:type_name -> pulumirpc.LogSeverity - 7, // 1: pulumirpc.StartDebuggingRequest.config:type_name -> google.protobuf.Struct - 1, // 2: pulumirpc.Engine.Log:input_type -> pulumirpc.LogRequest - 2, // 3: pulumirpc.Engine.GetRootResource:input_type -> pulumirpc.GetRootResourceRequest - 4, // 4: pulumirpc.Engine.SetRootResource:input_type -> pulumirpc.SetRootResourceRequest - 6, // 5: pulumirpc.Engine.StartDebugging:input_type -> pulumirpc.StartDebuggingRequest - 8, // 6: pulumirpc.Engine.Log:output_type -> google.protobuf.Empty - 3, // 7: pulumirpc.Engine.GetRootResource:output_type -> pulumirpc.GetRootResourceResponse - 5, // 8: pulumirpc.Engine.SetRootResource:output_type -> pulumirpc.SetRootResourceResponse - 8, // 9: pulumirpc.Engine.StartDebugging:output_type -> google.protobuf.Empty - 6, // [6:10] is the sub-list for method output_type - 2, // [2:6] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 0, // 0: pulumirpc.LogRequest.severity:type_name -> pulumirpc.LogSeverity + 9, // 1: pulumirpc.StartDebuggingRequest.config:type_name -> google.protobuf.Struct + 1, // 2: pulumirpc.Engine.Log:input_type -> pulumirpc.LogRequest + 2, // 3: pulumirpc.Engine.GetRootResource:input_type -> pulumirpc.GetRootResourceRequest + 4, // 4: pulumirpc.Engine.SetRootResource:input_type -> pulumirpc.SetRootResourceRequest + 6, // 5: pulumirpc.Engine.StartDebugging:input_type -> pulumirpc.StartDebuggingRequest + 7, // 6: pulumirpc.Engine.CheckPulumiVersion:input_type -> pulumirpc.CheckPulumiVersionRequest + 10, // 7: pulumirpc.Engine.Log:output_type -> google.protobuf.Empty + 3, // 8: pulumirpc.Engine.GetRootResource:output_type -> pulumirpc.GetRootResourceResponse + 5, // 9: pulumirpc.Engine.SetRootResource:output_type -> pulumirpc.SetRootResourceResponse + 10, // 10: pulumirpc.Engine.StartDebugging:output_type -> google.protobuf.Empty + 8, // 11: pulumirpc.Engine.CheckPulumiVersion:output_type -> pulumirpc.CheckPulumiVersionResponse + 7, // [7:12] is the sub-list for method output_type + 2, // [2:7] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_pulumi_engine_proto_init() } @@ -479,7 +572,7 @@ func file_pulumi_engine_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_pulumi_engine_proto_rawDesc), len(file_pulumi_engine_proto_rawDesc)), NumEnums: 1, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/engine_grpc.pb.go b/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/engine_grpc.pb.go index 6c4a11fb2..5be546650 100644 --- a/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/engine_grpc.pb.go +++ b/vendor/github.com/pulumi/pulumi/sdk/v3/proto/go/engine_grpc.pb.go @@ -1,4 +1,4 @@ -// Copyright 2016-2018, Pulumi Corporation. +// Copyright 2016-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. @@ -34,10 +34,11 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - Engine_Log_FullMethodName = "/pulumirpc.Engine/Log" - Engine_GetRootResource_FullMethodName = "/pulumirpc.Engine/GetRootResource" - Engine_SetRootResource_FullMethodName = "/pulumirpc.Engine/SetRootResource" - Engine_StartDebugging_FullMethodName = "/pulumirpc.Engine/StartDebugging" + Engine_Log_FullMethodName = "/pulumirpc.Engine/Log" + Engine_GetRootResource_FullMethodName = "/pulumirpc.Engine/GetRootResource" + Engine_SetRootResource_FullMethodName = "/pulumirpc.Engine/SetRootResource" + Engine_StartDebugging_FullMethodName = "/pulumirpc.Engine/StartDebugging" + Engine_CheckPulumiVersion_FullMethodName = "/pulumirpc.Engine/CheckPulumiVersion" ) // EngineClient is the client API for Engine service. @@ -58,6 +59,8 @@ type EngineClient interface { // StartDebugging indicates to the engine that the program has started under a debugger, and the engine // should notify the user of how to connect to the debugger. StartDebugging(ctx context.Context, in *StartDebuggingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // CheckPulumiVersion checks that the version of the engine satisfies the passed in range. + CheckPulumiVersion(ctx context.Context, in *CheckPulumiVersionRequest, opts ...grpc.CallOption) (*CheckPulumiVersionResponse, error) } type engineClient struct { @@ -108,6 +111,16 @@ func (c *engineClient) StartDebugging(ctx context.Context, in *StartDebuggingReq return out, nil } +func (c *engineClient) CheckPulumiVersion(ctx context.Context, in *CheckPulumiVersionRequest, opts ...grpc.CallOption) (*CheckPulumiVersionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CheckPulumiVersionResponse) + err := c.cc.Invoke(ctx, Engine_CheckPulumiVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // EngineServer is the server API for Engine service. // All implementations must embed UnimplementedEngineServer // for forward compatibility. @@ -126,6 +139,8 @@ type EngineServer interface { // StartDebugging indicates to the engine that the program has started under a debugger, and the engine // should notify the user of how to connect to the debugger. StartDebugging(context.Context, *StartDebuggingRequest) (*emptypb.Empty, error) + // CheckPulumiVersion checks that the version of the engine satisfies the passed in range. + CheckPulumiVersion(context.Context, *CheckPulumiVersionRequest) (*CheckPulumiVersionResponse, error) mustEmbedUnimplementedEngineServer() } @@ -148,6 +163,9 @@ func (UnimplementedEngineServer) SetRootResource(context.Context, *SetRootResour func (UnimplementedEngineServer) StartDebugging(context.Context, *StartDebuggingRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method StartDebugging not implemented") } +func (UnimplementedEngineServer) CheckPulumiVersion(context.Context, *CheckPulumiVersionRequest) (*CheckPulumiVersionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckPulumiVersion not implemented") +} func (UnimplementedEngineServer) mustEmbedUnimplementedEngineServer() {} func (UnimplementedEngineServer) testEmbeddedByValue() {} @@ -241,6 +259,24 @@ func _Engine_StartDebugging_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Engine_CheckPulumiVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckPulumiVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EngineServer).CheckPulumiVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Engine_CheckPulumiVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EngineServer).CheckPulumiVersion(ctx, req.(*CheckPulumiVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Engine_ServiceDesc is the grpc.ServiceDesc for Engine service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -264,6 +300,10 @@ var Engine_ServiceDesc = grpc.ServiceDesc{ MethodName: "StartDebugging", Handler: _Engine_StartDebugging_Handler, }, + { + MethodName: "CheckPulumiVersion", + Handler: _Engine_CheckPulumiVersion_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "pulumi/engine.proto", 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 4f202bc26..b34b270c0 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 @@ -334,15 +334,8 @@ type ProviderHandshakeResponse struct { // True if the provider accepts and respects autonaming configuration that the engine provides on behalf of the // user. *Must* match the value returned in response to [](pulumirpc.ResourceProvider.Configure). SupportsAutonamingConfiguration bool `protobuf:"varint,4,opt,name=supports_autonaming_configuration,json=supportsAutonamingConfiguration,proto3" json:"supports_autonaming_configuration,omitempty"` - // The CLI version range required for this provider to work correctly. If no version range is specified, the - // provider will be considered compatible with any CLI version. - // The supported syntax for ranges is that of https://pkg.go.dev/github.com/blang/semver#ParseRange. For example - // ">=3.0.0", or "!3.1.2". Ranges can be AND-ed together by concatenating with spaces ">=3.5.0 !3.7.7", meaning - // greater-or-equal to 3.5.0 and not exactly 3.7.7. Ranges can be OR-ed with the `||` operator: "<3.4.0 || >3.8.0", - // meaning less-than 3.4.0 or greater-than 3.8.0. - PulumiVersionRange *string `protobuf:"bytes,5,opt,name=pulumi_version_range,json=pulumiVersionRange,proto3,oneof" json:"pulumi_version_range,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ProviderHandshakeResponse) Reset() { @@ -403,13 +396,6 @@ func (x *ProviderHandshakeResponse) GetSupportsAutonamingConfiguration() bool { return false } -func (x *ProviderHandshakeResponse) GetPulumiVersionRange() string { - if x != nil && x.PulumiVersionRange != nil { - return *x.PulumiVersionRange - } - return "" -} - // `ParameterizeRequest` is the type of requests sent as part of a [](pulumirpc.ResourceProvider.Parameterize) call. A // `ParameterizeRequest` may contain either: // @@ -3909,14 +3895,12 @@ const file_pulumi_provider_proto_rawDesc = "" + "\x1esupports_refresh_before_update\x18\x06 \x01(\bR\x1bsupportsRefreshBeforeUpdate\x12.\n" + "\x13invoke_with_preview\x18\a \x01(\bR\x11invokeWithPreviewB\x11\n" + "\x0f_root_directoryB\x14\n" + - "\x12_program_directory\"\xb0\x02\n" + + "\x12_program_directory\"\xfc\x01\n" + "\x19ProviderHandshakeResponse\x12%\n" + "\x0eaccept_secrets\x18\x01 \x01(\bR\racceptSecrets\x12)\n" + "\x10accept_resources\x18\x02 \x01(\bR\x0facceptResources\x12%\n" + "\x0eaccept_outputs\x18\x03 \x01(\bR\racceptOutputs\x12J\n" + - "!supports_autonaming_configuration\x18\x04 \x01(\bR\x1fsupportsAutonamingConfiguration\x125\n" + - "\x14pulumi_version_range\x18\x05 \x01(\tH\x00R\x12pulumiVersionRange\x88\x01\x01B\x17\n" + - "\x15_pulumi_version_range\"\xad\x02\n" + + "!supports_autonaming_configuration\x18\x04 \x01(\bR\x1fsupportsAutonamingConfigurationJ\x04\b\x05\x10\x06R\x14pulumi_version_range\"\xad\x02\n" + "\x13ParameterizeRequest\x12C\n" + "\x04args\x18\x01 \x01(\v2-.pulumirpc.ParameterizeRequest.ParametersArgsH\x00R\x04args\x12F\n" + "\x05value\x18\x02 \x01(\v2..pulumirpc.ParameterizeRequest.ParametersValueH\x00R\x05value\x1a$\n" + @@ -4448,7 +4432,6 @@ func file_pulumi_provider_proto_init() { } file_pulumi_plugin_proto_init() file_pulumi_provider_proto_msgTypes[0].OneofWrappers = []any{} - file_pulumi_provider_proto_msgTypes[1].OneofWrappers = []any{} file_pulumi_provider_proto_msgTypes[2].OneofWrappers = []any{ (*ParameterizeRequest_Args)(nil), (*ParameterizeRequest_Value)(nil), diff --git a/vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go b/vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go index cb4cadc32..dfbfc1eb3 100644 --- a/vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go +++ b/vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go @@ -37,6 +37,15 @@ type priorityWriteSchedulerRFC9218 struct { // incremental streams or not, when urgency is the same in a given Pop() // call. prioritizeIncremental bool + + // priorityUpdateBuf is used to buffer the most recent PRIORITY_UPDATE we + // receive per https://www.rfc-editor.org/rfc/rfc9218.html#name-the-priority_update-frame. + priorityUpdateBuf struct { + // streamID being 0 means that the buffer is empty. This is a safe + // assumption as PRIORITY_UPDATE for stream 0 is a PROTOCOL_ERROR. + streamID uint32 + priority PriorityParam + } } func newPriorityWriteSchedulerRFC9218() WriteScheduler { @@ -50,6 +59,10 @@ func (ws *priorityWriteSchedulerRFC9218) OpenStream(streamID uint32, opt OpenStr if ws.streams[streamID].location != nil { panic(fmt.Errorf("stream %d already opened", streamID)) } + if streamID == ws.priorityUpdateBuf.streamID { + ws.priorityUpdateBuf.streamID = 0 + opt.priority = ws.priorityUpdateBuf.priority + } q := ws.queuePool.get() ws.streams[streamID] = streamMetadata{ location: q, @@ -95,6 +108,8 @@ func (ws *priorityWriteSchedulerRFC9218) AdjustStream(streamID uint32, priority metadata := ws.streams[streamID] q, u, i := metadata.location, metadata.priority.urgency, metadata.priority.incremental if q == nil { + ws.priorityUpdateBuf.streamID = streamID + ws.priorityUpdateBuf.priority = priority return } diff --git a/vendor/golang.org/x/term/terminal.go b/vendor/golang.org/x/term/terminal.go index 9255449b9..6ec537cdc 100644 --- a/vendor/golang.org/x/term/terminal.go +++ b/vendor/golang.org/x/term/terminal.go @@ -160,7 +160,9 @@ const ( keyEnd keyDeleteWord keyDeleteLine + keyDelete keyClearScreen + keyTranspose keyPasteStart keyPasteEnd ) @@ -194,6 +196,8 @@ func bytesToKey(b []byte, pasteActive bool) (rune, []byte) { return keyDeleteLine, b[1:] case 12: // ^L return keyClearScreen, b[1:] + case 20: // ^T + return keyTranspose, b[1:] case 23: // ^W return keyDeleteWord, b[1:] case 14: // ^N @@ -228,6 +232,10 @@ func bytesToKey(b []byte, pasteActive bool) (rune, []byte) { } } + if !pasteActive && len(b) >= 4 && b[0] == keyEscape && b[1] == '[' && b[2] == '3' && b[3] == '~' { + return keyDelete, b[4:] + } + if !pasteActive && len(b) >= 6 && b[0] == keyEscape && b[1] == '[' && b[2] == '1' && b[3] == ';' && b[4] == '3' { switch b[5] { case 'C': @@ -590,7 +598,7 @@ func (t *Terminal) handleKey(key rune) (line string, ok bool) { } t.line = t.line[:t.pos] t.moveCursorToPos(t.pos) - case keyCtrlD: + case keyCtrlD, keyDelete: // Erase the character under the current position. // The EOF case when the line is empty is handled in // readLine(). @@ -600,6 +608,24 @@ func (t *Terminal) handleKey(key rune) (line string, ok bool) { } case keyCtrlU: t.eraseNPreviousChars(t.pos) + case keyTranspose: + // This transposes the two characters around the cursor and advances the cursor. Best-effort. + if len(t.line) < 2 || t.pos < 1 { + return + } + swap := t.pos + if swap == len(t.line) { + swap-- // special: at end of line, swap previous two chars + } + t.line[swap-1], t.line[swap] = t.line[swap], t.line[swap-1] + if t.pos < len(t.line) { + t.pos++ + } + if t.echo { + t.moveCursorToPos(swap - 1) + t.writeLine(t.line[swap-1:]) + t.moveCursorToPos(t.pos) + } case keyClearScreen: // Erases the screen and moves the cursor to the home position. t.queue([]rune("\x1b[2J\x1b[H")) diff --git a/vendor/golang.org/x/tools/go/ast/inspector/cursor.go b/vendor/golang.org/x/tools/go/ast/inspector/cursor.go index fc9bbc714..60ad425f3 100644 --- a/vendor/golang.org/x/tools/go/ast/inspector/cursor.go +++ b/vendor/golang.org/x/tools/go/ast/inspector/cursor.go @@ -453,6 +453,9 @@ func (c Cursor) FindNode(n ast.Node) (Cursor, bool) { // rooted at c such that n.Pos() <= start && end <= n.End(). // (For an *ast.File, it uses the bounds n.FileStart-n.FileEnd.) // +// An empty range (start == end) between two adjacent nodes is +// considered to belong to the first node. +// // It returns zero if none is found. // Precondition: start <= end. // @@ -501,10 +504,17 @@ func (c Cursor) FindByPos(start, end token.Pos) (Cursor, bool) { break // disjoint, after; stop } } + // Inv: node.{Pos,FileStart} <= start if end <= nodeEnd { // node fully contains target range best = i + + // Don't search beyond end of the first match. + // This is important only for an empty range (start=end) + // between two adjoining nodes, which would otherwise + // match both nodes; we want to match only the first. + limit = ev.index } else if nodeEnd < start { i = ev.index // disjoint, before; skip forward } diff --git a/vendor/golang.org/x/tools/internal/stdlib/deps.go b/vendor/golang.org/x/tools/internal/stdlib/deps.go index f7b9c1286..f41431c94 100644 --- a/vendor/golang.org/x/tools/internal/stdlib/deps.go +++ b/vendor/golang.org/x/tools/internal/stdlib/deps.go @@ -12,364 +12,366 @@ type pkginfo struct { } var deps = [...]pkginfo{ - {"archive/tar", "\x03p\x03F=\x01\n\x01$\x01\x01\x02\x05\b\x02\x01\x02\x02\f"}, - {"archive/zip", "\x02\x04f\a\x03\x13\x021=\x01+\x05\x01\x0f\x03\x02\x0e\x04"}, - {"bufio", "\x03p\x86\x01D\x14"}, - {"bytes", "s+[\x03\fG\x02\x02"}, + {"archive/tar", "\x03q\x03F=\x01\n\x01$\x01\x01\x02\x05\b\x02\x01\x02\x02\r"}, + {"archive/zip", "\x02\x04g\a\x03\x13\x021=\x01+\x05\x01\x0f\x03\x02\x0f\x04"}, + {"bufio", "\x03q\x86\x01D\x15"}, + {"bytes", "t+[\x03\fH\x02\x02"}, {"cmp", ""}, - {"compress/bzip2", "\x02\x02\xf5\x01A"}, - {"compress/flate", "\x02q\x03\x83\x01\f\x033\x01\x03"}, - {"compress/gzip", "\x02\x04f\a\x03\x15nT"}, - {"compress/lzw", "\x02q\x03\x83\x01"}, - {"compress/zlib", "\x02\x04f\a\x03\x13\x01o"}, - {"container/heap", "\xbb\x02"}, + {"compress/bzip2", "\x02\x02\xf6\x01A"}, + {"compress/flate", "\x02r\x03\x83\x01\f\x033\x01\x03"}, + {"compress/gzip", "\x02\x04g\a\x03\x15nU"}, + {"compress/lzw", "\x02r\x03\x83\x01"}, + {"compress/zlib", "\x02\x04g\a\x03\x13\x01o"}, + {"container/heap", "\xbc\x02"}, {"container/list", ""}, {"container/ring", ""}, - {"context", "s\\p\x01\r"}, - {"crypto", "\x89\x01pC"}, - {"crypto/aes", "\x10\n\t\x99\x02"}, - {"crypto/cipher", "\x03 \x01\x01 \x12\x1c,Z"}, - {"crypto/des", "\x10\x15 .,\x9d\x01\x03"}, - {"crypto/dsa", "E\x04*\x86\x01\r"}, - {"crypto/ecdh", "\x03\v\f\x10\x04\x17\x04\x0e\x1c\x86\x01"}, - {"crypto/ecdsa", "\x0e\x05\x03\x04\x01\x10\b\v\x06\x01\x04\r\x01\x1c\x86\x01\r\x05K\x01"}, - {"crypto/ed25519", "\x0e\x1e\x12\a\v\a\x1c\x86\x01C"}, - {"crypto/elliptic", "3@\x86\x01\r9"}, - {"crypto/fips140", "\"\x05"}, - {"crypto/hkdf", "/\x15\x01.\x16"}, - {"crypto/hmac", "\x1a\x16\x14\x01\x122"}, - {"crypto/internal/boring", "\x0e\x02\rl"}, - {"crypto/internal/boring/bbig", "\x1a\xec\x01M"}, - {"crypto/internal/boring/bcache", "\xc0\x02\x13"}, + {"context", "t\\p\x01\x0e"}, + {"crypto", "\x8a\x01pC"}, + {"crypto/aes", "\x10\v\t\x99\x02"}, + {"crypto/cipher", "\x03!\x01\x01 \x12\x1c,Z"}, + {"crypto/des", "\x10\x16 .,\x9d\x01\x03"}, + {"crypto/dsa", "F\x03+\x86\x01\r"}, + {"crypto/ecdh", "\x03\v\r\x10\x04\x17\x03\x0f\x1c\x86\x01"}, + {"crypto/ecdsa", "\x0e\x05\x03\x05\x01\x10\b\v\x06\x01\x03\x0e\x01\x1c\x86\x01\r\x05L\x01"}, + {"crypto/ed25519", "\x0e\x1f\x12\a\x03\b\a\x1cI=C"}, + {"crypto/elliptic", "4@\x86\x01\r9"}, + {"crypto/fips140", "#\x05\x95\x01\x98\x01"}, + {"crypto/hkdf", "0\x15\x01.\x16"}, + {"crypto/hmac", "\x1b\x16\x14\x01\x122"}, + {"crypto/hpke", "\x03\v\x02\x03\x04\x01\f\x01\x05\x1f\x05\a\x01\x01\x1d\x03\x13\x16\x9b\x01\x1c"}, + {"crypto/internal/boring", "\x0e\x02\x0el"}, + {"crypto/internal/boring/bbig", "\x1b\xec\x01N"}, + {"crypto/internal/boring/bcache", "\xc1\x02\x14"}, {"crypto/internal/boring/sig", ""}, {"crypto/internal/constanttime", ""}, - {"crypto/internal/cryptotest", "\x03\r\n\b&\x0f\x19\x06\x13\x12 \x04\x06\t\x19\x01\x11\x11\x1b\x01\a\x05\b\x03\x05\v"}, - {"crypto/internal/entropy", "J"}, - {"crypto/internal/entropy/v1.0.0", "C0\x95\x018\x13"}, - {"crypto/internal/fips140", "B1\xbf\x01\v\x16"}, - {"crypto/internal/fips140/aes", "\x03\x1f\x03\x02\x14\x05\x01\x01\x06+\x95\x014"}, - {"crypto/internal/fips140/aes/gcm", "\"\x01\x02\x02\x02\x12\x05\x01\a+\x92\x01"}, - {"crypto/internal/fips140/alias", "\xd3\x02"}, - {"crypto/internal/fips140/bigmod", "'\x19\x01\a+\x95\x01"}, - {"crypto/internal/fips140/check", "\"\x0e\a\t\x02\xb7\x01Z"}, - {"crypto/internal/fips140/check/checktest", "'\x8b\x02!"}, - {"crypto/internal/fips140/drbg", "\x03\x1e\x01\x01\x04\x14\x05\t\x01)\x86\x01\x0f7\x01"}, - {"crypto/internal/fips140/ecdh", "\x03\x1f\x05\x02\n\r3\x86\x01\x0f7"}, - {"crypto/internal/fips140/ecdsa", "\x03\x1f\x04\x01\x02\a\x03\x06:\x16pF"}, - {"crypto/internal/fips140/ed25519", "\x03\x1f\x05\x02\x04\f:\xc9\x01\x03"}, - {"crypto/internal/fips140/edwards25519", "\x1e\t\a\x123\x95\x017"}, - {"crypto/internal/fips140/edwards25519/field", "'\x14\x053\x95\x01"}, - {"crypto/internal/fips140/hkdf", "\x03\x1f\x05\t\a<\x16"}, - {"crypto/internal/fips140/hmac", "\x03\x1f\x15\x01\x01:\x16"}, - {"crypto/internal/fips140/mldsa", "\x03\x1b\x04\x05\x02\x0e\x01\x03\x053\x95\x017"}, - {"crypto/internal/fips140/mlkem", "\x03\x1f\x05\x02\x0f\x03\x053\xcc\x01"}, - {"crypto/internal/fips140/nistec", "\x1e\t\r\f3\x95\x01*\r\x14"}, - {"crypto/internal/fips140/nistec/fiat", "'\x148\x95\x01"}, - {"crypto/internal/fips140/pbkdf2", "\x03\x1f\x05\t\a<\x16"}, - {"crypto/internal/fips140/rsa", "\x03\x1b\x04\x04\x01\x02\x0e\x01\x01\x028\x16pF"}, - {"crypto/internal/fips140/sha256", "\x03\x1f\x1e\x01\a+\x16\x7f"}, - {"crypto/internal/fips140/sha3", "\x03\x1f\x19\x05\x012\x95\x01K"}, - {"crypto/internal/fips140/sha512", "\x03\x1f\x1e\x01\a+\x16\x7f"}, - {"crypto/internal/fips140/ssh", "'b"}, - {"crypto/internal/fips140/subtle", "\x1e\a\x1b\xc8\x01"}, - {"crypto/internal/fips140/tls12", "\x03\x1f\x05\t\a\x02:\x16"}, - {"crypto/internal/fips140/tls13", "\x03\x1f\x05\b\b\t3\x16"}, - {"crypto/internal/fips140cache", "\xb2\x02\r&"}, + {"crypto/internal/cryptotest", "\x03\r\v\b%\x10\x19\x06\x13\x12 \x04\x06\t\x19\x01\x11\x11\x1b\x01\a\x05\b\x03\x05\f"}, + {"crypto/internal/entropy", "K"}, + {"crypto/internal/entropy/v1.0.0", "D0\x95\x018\x14"}, + {"crypto/internal/fips140", "C1\xbf\x01\v\x17"}, + {"crypto/internal/fips140/aes", "\x03 \x03\x02\x14\x05\x01\x01\x05,\x95\x014"}, + {"crypto/internal/fips140/aes/gcm", "#\x01\x02\x02\x02\x12\x05\x01\x06,\x92\x01"}, + {"crypto/internal/fips140/alias", "\xd5\x02"}, + {"crypto/internal/fips140/bigmod", "(\x19\x01\x06,\x95\x01"}, + {"crypto/internal/fips140/check", "#\x0e\a\t\x02\xb7\x01["}, + {"crypto/internal/fips140/check/checktest", "(\x8b\x02\""}, + {"crypto/internal/fips140/drbg", "\x03\x1f\x01\x01\x04\x14\x05\n)\x86\x01\x0f7\x01"}, + {"crypto/internal/fips140/ecdh", "\x03 \x05\x02\n\r3\x86\x01\x0f7"}, + {"crypto/internal/fips140/ecdsa", "\x03 \x04\x01\x02\a\x03\x06:\x16pF"}, + {"crypto/internal/fips140/ed25519", "\x03 \x05\x02\x04\f:\xc9\x01\x03"}, + {"crypto/internal/fips140/edwards25519", "\x1f\t\a\x123\x95\x017"}, + {"crypto/internal/fips140/edwards25519/field", "(\x14\x053\x95\x01"}, + {"crypto/internal/fips140/hkdf", "\x03 \x05\t\a<\x16"}, + {"crypto/internal/fips140/hmac", "\x03 \x15\x01\x01:\x16"}, + {"crypto/internal/fips140/mldsa", "\x03\x1c\x04\x05\x02\x0e\x01\x03\x053\x95\x017"}, + {"crypto/internal/fips140/mlkem", "\x03 \x05\x02\x0f\x03\x053\xcc\x01"}, + {"crypto/internal/fips140/nistec", "\x1f\t\r\f3\x95\x01*\r\x15"}, + {"crypto/internal/fips140/nistec/fiat", "(\x148\x95\x01"}, + {"crypto/internal/fips140/pbkdf2", "\x03 \x05\t\a<\x16"}, + {"crypto/internal/fips140/rsa", "\x03\x1c\x04\x04\x01\x02\x0e\x01\x01\x028\x16pF"}, + {"crypto/internal/fips140/sha256", "\x03 \x1e\x01\x06,\x16\x7f"}, + {"crypto/internal/fips140/sha3", "\x03 \x19\x05\x012\x95\x01L"}, + {"crypto/internal/fips140/sha512", "\x03 \x1e\x01\x06,\x16\x7f"}, + {"crypto/internal/fips140/ssh", "(b"}, + {"crypto/internal/fips140/subtle", "\x1f\a\x1b\xc8\x01"}, + {"crypto/internal/fips140/tls12", "\x03 \x05\t\a\x02:\x16"}, + {"crypto/internal/fips140/tls13", "\x03 \x05\b\b\t3\x16"}, + {"crypto/internal/fips140cache", "\xb3\x02\r'"}, {"crypto/internal/fips140deps", ""}, - {"crypto/internal/fips140deps/byteorder", "\x9f\x01"}, - {"crypto/internal/fips140deps/cpu", "\xb4\x01\a"}, - {"crypto/internal/fips140deps/godebug", "\xbc\x01"}, - {"crypto/internal/fips140deps/time", "\xcd\x02"}, - {"crypto/internal/fips140hash", "8\x1d4\xca\x01"}, - {"crypto/internal/fips140only", ")\x0e\x01\x01P3="}, + {"crypto/internal/fips140deps/byteorder", "\xa0\x01"}, + {"crypto/internal/fips140deps/cpu", "\xb5\x01\a"}, + {"crypto/internal/fips140deps/godebug", "\xbd\x01"}, + {"crypto/internal/fips140deps/time", "\xcf\x02"}, + {"crypto/internal/fips140hash", "9\x1d4\xcb\x01"}, + {"crypto/internal/fips140only", "\x17\x13\x0e\x01\x01Pp"}, {"crypto/internal/fips140test", ""}, - {"crypto/internal/hpke", "\x03\v\x01\x01\x03\x055\x03\x04\x01\x01\x16\a\x03\x13\xcc\x01"}, - {"crypto/internal/impl", "\xbd\x02"}, - {"crypto/internal/randutil", "\xf9\x01\x12"}, - {"crypto/internal/sysrand", "sq! \r\r\x01\x01\f\x06"}, - {"crypto/internal/sysrand/internal/seccomp", "s"}, - {"crypto/md5", "\x0e7.\x16\x16i"}, - {"crypto/mlkem", "\x0e$"}, - {"crypto/mlkem/mlkemtest", "2\x1b&"}, - {"crypto/pbkdf2", "5\x0f\x01.\x16"}, - {"crypto/rand", "\x1a\b\a\x1c\x04\x01)\x86\x01\rM"}, - {"crypto/rc4", "% .\xc9\x01"}, - {"crypto/rsa", "\x0e\f\x01\v\x10\x0e\x01\x04\a\a\x1c\x03\x133=\f\x01"}, - {"crypto/sha1", "\x0e\f+\x03+\x16\x16\x15T"}, - {"crypto/sha256", "\x0e\f\x1dR"}, - {"crypto/sha3", "\x0e*Q\xca\x01"}, - {"crypto/sha512", "\x0e\f\x1fP"}, - {"crypto/subtle", "\x1e\x1d\x9f\x01X"}, - {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\t\x01\x0e\n\x01\n\x05\x04\x01\x01\x01\x01\x02\x01\x02\x01\x17\x02\x03\x13\x16\x15\b=\x16\x16\r\b\x01\x01\x01\x02\x01\r\x06\x02\x01\x0f"}, - {"crypto/tls/internal/fips140tls", "\x17\xa9\x02"}, - {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x016\x06\x01\x01\x02\x05\x0e\x06\x02\x02\x03F\x03:\x01\x02\b\x01\x01\x02\a\x10\x05\x01\x06\a\b\x02\x01\x02\x0e\x02\x01\x01\x02\x03\x01"}, - {"crypto/x509/pkix", "i\x06\a\x90\x01G"}, - {"database/sql", "\x03\nP\x16\x03\x83\x01\v\a\"\x05\b\x02\x03\x01\r\x02\x02\x02"}, - {"database/sql/driver", "\rf\x03\xb7\x01\x0f\x11"}, - {"debug/buildinfo", "\x03]\x02\x01\x01\b\a\x03g\x1a\x02\x01+\x0f\x1f"}, - {"debug/dwarf", "\x03i\a\x03\x83\x011\x11\x01\x01"}, - {"debug/elf", "\x03\x06V\r\a\x03g\x1b\x01\f \x17\x01\x16"}, - {"debug/gosym", "\x03i\n\xc5\x01\x01\x01\x02"}, - {"debug/macho", "\x03\x06V\r\ng\x1c,\x17\x01"}, - {"debug/pe", "\x03\x06V\r\a\x03g\x1c,\x17\x01\x16"}, - {"debug/plan9obj", "l\a\x03g\x1c,"}, - {"embed", "s+B\x19\x01S"}, + {"crypto/internal/impl", "\xbe\x02"}, + {"crypto/internal/rand", "\x1b\x0f s=["}, + {"crypto/internal/randutil", "\xfa\x01\x12"}, + {"crypto/internal/sysrand", "tq! \r\r\x01\x01\r\x06"}, + {"crypto/internal/sysrand/internal/seccomp", "t"}, + {"crypto/md5", "\x0e8.\x16\x16i"}, + {"crypto/mlkem", "\x0e%"}, + {"crypto/mlkem/mlkemtest", "3\x13\b&"}, + {"crypto/pbkdf2", "6\x0f\x01.\x16"}, + {"crypto/rand", "\x1b\x0f\x1c\x03+\x86\x01\rN"}, + {"crypto/rc4", "& .\xc9\x01"}, + {"crypto/rsa", "\x0e\r\x01\v\x10\x0e\x01\x03\b\a\x1c\x03\x133=\f\x01"}, + {"crypto/sha1", "\x0e\r+\x02,\x16\x16\x15T"}, + {"crypto/sha256", "\x0e\r\x1dR"}, + {"crypto/sha3", "\x0e+Q\xcb\x01"}, + {"crypto/sha512", "\x0e\r\x1fP"}, + {"crypto/subtle", "\x1f\x1d\x9f\x01z"}, + {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\x01\t\x01\x18\x01\x0f\x01\x03\x01\x01\x01\x01\x02\x01\x02\x01\x17\x02\x03\x13\x16\x15\b=\x16\x16\r\b\x01\x01\x01\x02\x01\x0e\x06\x02\x01\x0f"}, + {"crypto/tls/internal/fips140tls", "\x17\xaa\x02"}, + {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x017\x06\x01\x01\x02\x05\x0e\x06\x02\x02\x03F\x03:\x01\x02\b\x01\x01\x02\a\x10\x05\x01\x06\a\b\x02\x01\x02\x0f\x02\x01\x01\x02\x03\x01"}, + {"crypto/x509/pkix", "j\x06\a\x90\x01H"}, + {"database/sql", "\x03\nQ\x16\x03\x83\x01\v\a\"\x05\b\x02\x03\x01\x0e\x02\x02\x02"}, + {"database/sql/driver", "\rg\x03\xb7\x01\x0f\x12"}, + {"debug/buildinfo", "\x03^\x02\x01\x01\b\a\x03g\x1a\x02\x01+\x0f "}, + {"debug/dwarf", "\x03j\a\x03\x83\x011\x11\x01\x01"}, + {"debug/elf", "\x03\x06W\r\a\x03g\x1b\x01\f \x17\x01\x17"}, + {"debug/gosym", "\x03j\n$\xa1\x01\x01\x01\x02"}, + {"debug/macho", "\x03\x06W\r\ng\x1c,\x17\x01"}, + {"debug/pe", "\x03\x06W\r\a\x03g\x1c,\x17\x01\x17"}, + {"debug/plan9obj", "m\a\x03g\x1c,"}, + {"embed", "t+B\x19\x01T"}, {"embed/internal/embedtest", ""}, {"encoding", ""}, - {"encoding/ascii85", "\xf9\x01C"}, - {"encoding/asn1", "\x03p\x03g(\x01'\r\x02\x01\x10\x03\x01"}, - {"encoding/base32", "\xf9\x01A\x02"}, - {"encoding/base64", "\x9f\x01ZA\x02"}, - {"encoding/binary", "s\x86\x01\f(\r\x05"}, - {"encoding/csv", "\x02\x01p\x03\x83\x01D\x12\x02"}, - {"encoding/gob", "\x02e\x05\a\x03g\x1c\v\x01\x03\x1d\b\x12\x01\x0f\x02"}, - {"encoding/hex", "s\x03\x83\x01A\x03"}, - {"encoding/json", "\x03\x01c\x04\b\x03\x83\x01\f(\r\x02\x01\x02\x10\x01\x01\x02"}, - {"encoding/pem", "\x03h\b\x86\x01A\x03"}, - {"encoding/xml", "\x02\x01d\f\x03\x83\x014\x05\n\x01\x02\x10\x02"}, - {"errors", "\xcf\x01\x84\x01"}, - {"expvar", "pLA\b\v\x15\r\b\x02\x03\x01\x11"}, - {"flag", "g\f\x03\x83\x01,\b\x05\b\x02\x01\x10"}, - {"fmt", "sF'\x19\f \b\r\x02\x03\x12"}, - {"go/ast", "\x03\x01r\x0f\x01s\x03)\b\r\x02\x01\x12\x02"}, - {"go/build", "\x02\x01p\x03\x01\x02\x02\b\x02\x01\x17\x1f\x04\x02\b\x1c\x13\x01+\x01\x04\x01\a\b\x02\x01\x12\x02\x02"}, - {"go/build/constraint", "s\xc9\x01\x01\x12\x02"}, - {"go/constant", "v\x10\x7f\x01\x024\x01\x02\x12"}, - {"go/doc", "\x04r\x01\x05\n=61\x10\x02\x01\x12\x02"}, - {"go/doc/comment", "\x03s\xc4\x01\x01\x01\x01\x12\x02"}, - {"go/format", "\x03s\x01\f\x01\x02sD"}, - {"go/importer", "x\a\x01\x02\x04\x01r9"}, - {"go/internal/gccgoimporter", "\x02\x01]\x13\x03\x04\f\x01p\x02,\x01\x05\x11\x01\f\b"}, - {"go/internal/gcimporter", "\x02t\x10\x010\x05\r0,\x15\x03\x02"}, - {"go/internal/scannerhooks", "\x86\x01"}, - {"go/internal/srcimporter", "v\x01\x01\v\x03\x01r,\x01\x05\x12\x02\x14"}, - {"go/parser", "\x03p\x03\x01\x02\b\x04\x01s\x01+\x06\x12"}, - {"go/printer", "v\x01\x02\x03\ns\f \x15\x02\x01\x02\v\x05\x02"}, - {"go/scanner", "\x03s\v\x05s2\x10\x01\x13\x02"}, - {"go/token", "\x04r\x86\x01>\x02\x03\x01\x0f\x02"}, - {"go/types", "\x03\x01\x06i\x03\x01\x03\t\x03\x024\x063\x04\x03\t \x06\a\b\x01\x01\x01\x02\x01\x0f\x02\x02"}, - {"go/version", "\xc1\x01|"}, - {"hash", "\xf9\x01"}, - {"hash/adler32", "s\x16\x16"}, - {"hash/crc32", "s\x16\x16\x15\x8b\x01\x01\x13"}, - {"hash/crc64", "s\x16\x16\xa0\x01"}, - {"hash/fnv", "s\x16\x16i"}, - {"hash/maphash", "\x89\x01\x11<}"}, - {"html", "\xbd\x02\x02\x12"}, - {"html/template", "\x03m\x06\x19-=\x01\n!\x05\x01\x02\x03\f\x01\x02\f\x01\x03\x02"}, - {"image", "\x02q\x1fg\x0f4\x03\x01"}, + {"encoding/ascii85", "\xfa\x01C"}, + {"encoding/asn1", "\x03q\x03g(\x01'\r\x02\x01\x11\x03\x01"}, + {"encoding/base32", "\xfa\x01A\x02"}, + {"encoding/base64", "\xa0\x01ZA\x02"}, + {"encoding/binary", "t\x86\x01\f(\r\x05"}, + {"encoding/csv", "\x02\x01q\x03\x83\x01D\x13\x02"}, + {"encoding/gob", "\x02f\x05\a\x03g\x1c\v\x01\x03\x1d\b\x12\x01\x10\x02"}, + {"encoding/hex", "t\x03\x83\x01A\x03"}, + {"encoding/json", "\x03\x01d\x04\b\x03\x83\x01\f(\r\x02\x01\x02\x11\x01\x01\x02"}, + {"encoding/pem", "\x03i\b\x86\x01A\x03"}, + {"encoding/xml", "\x02\x01e\f\x03\x83\x014\x05\n\x01\x02\x11\x02"}, + {"errors", "\xd0\x01\x85\x01"}, + {"expvar", "qLA\b\v\x15\r\b\x02\x03\x01\x12"}, + {"flag", "h\f\x03\x83\x01,\b\x05\b\x02\x01\x11"}, + {"fmt", "tF'\x19\f \b\r\x02\x03\x13"}, + {"go/ast", "\x03\x01s\x0f\x01s\x03)\b\r\x02\x01\x13\x02"}, + {"go/build", "\x02\x01q\x03\x01\x02\x02\b\x02\x01\x17\x1f\x04\x02\b\x1c\x13\x01+\x01\x04\x01\a\b\x02\x01\x13\x02\x02"}, + {"go/build/constraint", "t\xc9\x01\x01\x13\x02"}, + {"go/constant", "w\x10\x7f\x01\x024\x01\x02\x13"}, + {"go/doc", "\x04s\x01\x05\n=61\x10\x02\x01\x13\x02"}, + {"go/doc/comment", "\x03t\xc4\x01\x01\x01\x01\x13\x02"}, + {"go/format", "\x03t\x01\f\x01\x02sD"}, + {"go/importer", "y\a\x01\x02\x04\x01r9"}, + {"go/internal/gccgoimporter", "\x02\x01^\x13\x03\x04\f\x01p\x02,\x01\x05\x11\x01\r\b"}, + {"go/internal/gcimporter", "\x02u\x10\x010\x05\r0,\x15\x03\x02"}, + {"go/internal/scannerhooks", "\x87\x01"}, + {"go/internal/srcimporter", "w\x01\x01\v\x03\x01r,\x01\x05\x12\x02\x15"}, + {"go/parser", "\x03q\x03\x01\x02\b\x04\x01s\x01+\x06\x12"}, + {"go/printer", "w\x01\x02\x03\ns\f \x15\x02\x01\x02\f\x05\x02"}, + {"go/scanner", "\x03t\v\x05s2\x10\x01\x14\x02"}, + {"go/token", "\x04s\x86\x01>\x02\x03\x01\x10\x02"}, + {"go/types", "\x03\x01\x06j\x03\x01\x03\t\x03\x024\x063\x04\x03\t \x06\a\b\x01\x01\x01\x02\x01\x10\x02\x02"}, + {"go/version", "\xc2\x01|"}, + {"hash", "\xfa\x01"}, + {"hash/adler32", "t\x16\x16"}, + {"hash/crc32", "t\x16\x16\x15\x8b\x01\x01\x14"}, + {"hash/crc64", "t\x16\x16\xa0\x01"}, + {"hash/fnv", "t\x16\x16i"}, + {"hash/maphash", "\x8a\x01\x11<~"}, + {"html", "\xbe\x02\x02\x13"}, + {"html/template", "\x03n\x06\x19-=\x01\n!\x05\x01\x02\x03\f\x01\x02\r\x01\x03\x02"}, + {"image", "\x02r\x1fg\x0f4\x03\x01"}, {"image/color", ""}, - {"image/color/palette", "\x92\x01"}, - {"image/draw", "\x91\x01\x01\x04"}, - {"image/gif", "\x02\x01\x05k\x03\x1b\x01\x01\x01\vZ\x0f"}, - {"image/internal/imageutil", "\x91\x01"}, - {"image/jpeg", "\x02q\x1e\x01\x04c"}, - {"image/png", "\x02\ac\n\x13\x02\x06\x01gC"}, - {"index/suffixarray", "\x03i\a\x86\x01\f+\n\x01"}, - {"internal/abi", "\xbb\x01\x98\x01"}, - {"internal/asan", "\xd3\x02"}, - {"internal/bisect", "\xb2\x02\r\x01"}, - {"internal/buildcfg", "vHg\x06\x02\x05\n\x01"}, - {"internal/bytealg", "\xb4\x01\x9f\x01"}, + {"image/color/palette", "\x93\x01"}, + {"image/draw", "\x92\x01\x01\x04"}, + {"image/gif", "\x02\x01\x05l\x03\x1b\x01\x01\x01\vZ\x0f"}, + {"image/internal/imageutil", "\x92\x01"}, + {"image/jpeg", "\x02r\x1e\x01\x04c"}, + {"image/png", "\x02\ad\n\x13\x02\x06\x01gC"}, + {"index/suffixarray", "\x03j\a\x86\x01\f+\n\x01"}, + {"internal/abi", "\xbc\x01\x99\x01"}, + {"internal/asan", "\xd5\x02"}, + {"internal/bisect", "\xb3\x02\r\x01"}, + {"internal/buildcfg", "wHg\x06\x02\x05\n\x01"}, + {"internal/bytealg", "\xb5\x01\xa0\x01"}, {"internal/byteorder", ""}, {"internal/cfg", ""}, - {"internal/cgrouptest", "v[T\x06\x0f\x02\x01\x04\x01"}, - {"internal/chacha8rand", "\x9f\x01\x15\a\x98\x01"}, + {"internal/cgrouptest", "w[T\x06\x0f\x02\x01\x04\x01"}, + {"internal/chacha8rand", "\xa0\x01\x15\a\x99\x01"}, {"internal/copyright", ""}, {"internal/coverage", ""}, {"internal/coverage/calloc", ""}, - {"internal/coverage/cfile", "p\x06\x17\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01\"\x02',\x06\a\n\x01\x03\r\x06"}, - {"internal/coverage/cformat", "\x04r.\x04Q\v6\x01\x02\r"}, - {"internal/coverage/cmerge", "v.a"}, - {"internal/coverage/decodecounter", "l\n.\v\x02H,\x17\x17"}, - {"internal/coverage/decodemeta", "\x02j\n\x17\x17\v\x02H,"}, - {"internal/coverage/encodecounter", "\x02j\n.\f\x01\x02F\v!\x15"}, - {"internal/coverage/encodemeta", "\x02\x01i\n\x13\x04\x17\r\x02F,."}, - {"internal/coverage/pods", "\x04r.\x81\x01\x06\x05\n\x02\x01"}, - {"internal/coverage/rtcov", "\xd3\x02"}, - {"internal/coverage/slicereader", "l\n\x83\x01Z"}, - {"internal/coverage/slicewriter", "v\x83\x01"}, - {"internal/coverage/stringtab", "v9\x04F"}, + {"internal/coverage/cfile", "q\x06\x17\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01\"\x02',\x06\a\n\x01\x03\x0e\x06"}, + {"internal/coverage/cformat", "\x04s.\x04Q\v6\x01\x02\x0e"}, + {"internal/coverage/cmerge", "w.a"}, + {"internal/coverage/decodecounter", "m\n.\v\x02H,\x17\x18"}, + {"internal/coverage/decodemeta", "\x02k\n\x17\x17\v\x02H,"}, + {"internal/coverage/encodecounter", "\x02k\n.\f\x01\x02F\v!\x15"}, + {"internal/coverage/encodemeta", "\x02\x01j\n\x13\x04\x17\r\x02F,/"}, + {"internal/coverage/pods", "\x04s.\x81\x01\x06\x05\n\x02\x01"}, + {"internal/coverage/rtcov", "\xd5\x02"}, + {"internal/coverage/slicereader", "m\n\x83\x01["}, + {"internal/coverage/slicewriter", "w\x83\x01"}, + {"internal/coverage/stringtab", "w9\x04F"}, {"internal/coverage/test", ""}, {"internal/coverage/uleb128", ""}, - {"internal/cpu", "\xd3\x02"}, - {"internal/dag", "\x04r\xc4\x01\x03"}, - {"internal/diff", "\x03s\xc5\x01\x02"}, - {"internal/exportdata", "\x02\x01p\x03\x02e\x1c,\x01\x05\x11\x01\x02"}, - {"internal/filepathlite", "s+B\x1a@"}, - {"internal/fmtsort", "\x04\xa9\x02\r"}, - {"internal/fuzz", "\x03\nG\x18\x04\x03\x03\x01\f\x036=\f\x03\x1d\x01\x05\x02\x05\n\x01\x02\x01\x01\f\x04\x02"}, + {"internal/cpu", "\xd5\x02"}, + {"internal/dag", "\x04s\xc4\x01\x03"}, + {"internal/diff", "\x03t\xc5\x01\x02"}, + {"internal/exportdata", "\x02\x01q\x03\x02e\x1c,\x01\x05\x11\x01\x02"}, + {"internal/filepathlite", "t+B\x1a@"}, + {"internal/fmtsort", "\x04\xaa\x02\r"}, + {"internal/fuzz", "\x03\nH\x18\x04\x03\x03\x01\f\x036=\f\x03\x1d\x01\x05\x02\x05\n\x01\x02\x01\x01\r\x04\x02"}, {"internal/goarch", ""}, - {"internal/godebug", "\x9c\x01!\x82\x01\x01\x13"}, + {"internal/godebug", "\x9d\x01!\x82\x01\x01\x14"}, {"internal/godebugs", ""}, {"internal/goexperiment", ""}, {"internal/goos", ""}, - {"internal/goroot", "\xa5\x02\x01\x05\x12\x02"}, + {"internal/goroot", "\xa6\x02\x01\x05\x12\x02"}, {"internal/gover", "\x04"}, {"internal/goversion", ""}, - {"internal/lazyregexp", "\xa5\x02\v\r\x02"}, - {"internal/lazytemplate", "\xf9\x01,\x18\x02\f"}, - {"internal/msan", "\xd3\x02"}, + {"internal/lazyregexp", "\xa6\x02\v\r\x02"}, + {"internal/lazytemplate", "\xfa\x01,\x18\x02\r"}, + {"internal/msan", "\xd5\x02"}, {"internal/nettrace", ""}, - {"internal/obscuretestdata", "k\x8e\x01,"}, - {"internal/oserror", "s"}, - {"internal/pkgbits", "\x03Q\x18\a\x03\x04\fs\r\x1f\r\n\x01"}, + {"internal/obscuretestdata", "l\x8e\x01,"}, + {"internal/oserror", "t"}, + {"internal/pkgbits", "\x03R\x18\a\x03\x04\fs\r\x1f\r\n\x01"}, {"internal/platform", ""}, - {"internal/poll", "sl\x05\x159\r\x01\x01\f\x06"}, - {"internal/profile", "\x03\x04l\x03\x83\x017\n\x01\x01\x01\x10"}, + {"internal/poll", "tl\x05\x159\r\x01\x01\r\x06"}, + {"internal/profile", "\x03\x04m\x03\x83\x017\n\x01\x01\x01\x11"}, {"internal/profilerecord", ""}, - {"internal/race", "\x9a\x01\xb9\x01"}, - {"internal/reflectlite", "\x9a\x01!;\x16"}, - {"vendor/golang.org/x/text/unicode/norm", "l\n\x83\x01F\x12\x11"}, - {"weak", "\x9a\x01\x98\x01!"}, + {"vendor/golang.org/x/crypto/internal/alias", "\xd5\x02"}, + {"vendor/golang.org/x/crypto/internal/poly1305", "X\x15\x9c\x01"}, + {"vendor/golang.org/x/net/dns/dnsmessage", "t\xc7\x01"}, + {"vendor/golang.org/x/net/http/httpguts", "\x90\x02\x14\x1a\x15\r"}, + {"vendor/golang.org/x/net/http/httpproxy", "t\x03\x99\x01\x10\x05\x01\x18\x15\r"}, + {"vendor/golang.org/x/net/http2/hpack", "\x03q\x03\x83\x01F"}, + {"vendor/golang.org/x/net/idna", "w\x8f\x018\x15\x10\x02\x01"}, + {"vendor/golang.org/x/net/nettest", "\x03j\a\x03\x83\x01\x11\x05\x16\x01\f\n\x01\x02\x02\x01\f"}, + {"vendor/golang.org/x/sys/cpu", "\xa6\x02\r\n\x01\x17"}, + {"vendor/golang.org/x/text/secure/bidirule", "t\xdf\x01\x11\x01"}, + {"vendor/golang.org/x/text/transform", "\x03q\x86\x01Y"}, + {"vendor/golang.org/x/text/unicode/bidi", "\x03\bl\x87\x01>\x17"}, + {"vendor/golang.org/x/text/unicode/norm", "m\n\x83\x01F\x13\x11"}, + {"weak", "\x9b\x01\x98\x01\""}, } // bootstrap is the list of bootstrap packages extracted from cmd/dist. diff --git a/vendor/golang.org/x/tools/internal/stdlib/manifest.go b/vendor/golang.org/x/tools/internal/stdlib/manifest.go index f1e24625a..33e4f505f 100644 --- a/vendor/golang.org/x/tools/internal/stdlib/manifest.go +++ b/vendor/golang.org/x/tools/internal/stdlib/manifest.go @@ -626,7 +626,7 @@ var PackageSymbols = map[string][]Symbol{ {"PublicKey", Type, 0, ""}, {"PublicKey.Parameters", Field, 0, ""}, {"PublicKey.Y", Field, 0, ""}, - {"Sign", Func, 0, "func(rand io.Reader, priv *PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)"}, + {"Sign", Func, 0, "func(random io.Reader, priv *PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)"}, {"Verify", Func, 0, "func(pub *PublicKey, hash []byte, r *big.Int, s *big.Int) bool"}, }, "crypto/ecdh": { @@ -674,7 +674,7 @@ var PackageSymbols = map[string][]Symbol{ {"(PublicKey).Params", Method, 0, ""}, {"(PublicKey).ScalarBaseMult", Method, 0, ""}, {"(PublicKey).ScalarMult", Method, 0, ""}, - {"GenerateKey", Func, 0, "func(c elliptic.Curve, rand io.Reader) (*PrivateKey, error)"}, + {"GenerateKey", Func, 0, "func(c elliptic.Curve, r io.Reader) (*PrivateKey, error)"}, {"ParseRawPrivateKey", Func, 25, "func(curve elliptic.Curve, data []byte) (*PrivateKey, error)"}, {"ParseUncompressedPublicKey", Func, 25, "func(curve elliptic.Curve, data []byte) (*PublicKey, error)"}, {"PrivateKey", Type, 0, ""}, @@ -685,7 +685,7 @@ var PackageSymbols = map[string][]Symbol{ {"PublicKey.X", Field, 0, ""}, {"PublicKey.Y", Field, 0, ""}, {"Sign", Func, 0, "func(rand io.Reader, priv *PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)"}, - {"SignASN1", Func, 15, "func(rand io.Reader, priv *PrivateKey, hash []byte) ([]byte, error)"}, + {"SignASN1", Func, 15, "func(r io.Reader, priv *PrivateKey, hash []byte) ([]byte, error)"}, {"Verify", Func, 0, "func(pub *PublicKey, hash []byte, r *big.Int, s *big.Int) bool"}, {"VerifyASN1", Func, 15, "func(pub *PublicKey, hash []byte, sig []byte) bool"}, }, @@ -696,7 +696,7 @@ var PackageSymbols = map[string][]Symbol{ {"(PrivateKey).Seed", Method, 13, ""}, {"(PrivateKey).Sign", Method, 13, ""}, {"(PublicKey).Equal", Method, 15, ""}, - {"GenerateKey", Func, 13, "func(rand io.Reader) (PublicKey, PrivateKey, error)"}, + {"GenerateKey", Func, 13, "func(random io.Reader) (PublicKey, PrivateKey, error)"}, {"NewKeyFromSeed", Func, 13, "func(seed []byte) PrivateKey"}, {"Options", Type, 20, ""}, {"Options.Context", Field, 20, ""}, @@ -745,7 +745,9 @@ var PackageSymbols = map[string][]Symbol{ }, "crypto/fips140": { {"Enabled", Func, 24, "func() bool"}, + {"Enforced", Func, 26, "func() bool"}, {"Version", Func, 26, "func() string"}, + {"WithoutEnforcement", Func, 26, "func(f func())"}, }, "crypto/hkdf": { {"Expand", Func, 24, "func[H hash.Hash](h func() H, pseudorandomKey []byte, info string, keyLength int) ([]byte, error)"}, @@ -756,6 +758,54 @@ var PackageSymbols = map[string][]Symbol{ {"Equal", Func, 1, "func(mac1 []byte, mac2 []byte) bool"}, {"New", Func, 0, "func(h func() hash.Hash, key []byte) hash.Hash"}, }, + "crypto/hpke": { + {"(*Recipient).Export", Method, 26, ""}, + {"(*Recipient).Open", Method, 26, ""}, + {"(*Sender).Export", Method, 26, ""}, + {"(*Sender).Seal", Method, 26, ""}, + {"(AEAD).ID", Method, 26, ""}, + {"(KDF).ID", Method, 26, ""}, + {"(KEM).DeriveKeyPair", Method, 26, ""}, + {"(KEM).GenerateKey", Method, 26, ""}, + {"(KEM).ID", Method, 26, ""}, + {"(KEM).NewPrivateKey", Method, 26, ""}, + {"(KEM).NewPublicKey", Method, 26, ""}, + {"(PrivateKey).Bytes", Method, 26, ""}, + {"(PrivateKey).KEM", Method, 26, ""}, + {"(PrivateKey).PublicKey", Method, 26, ""}, + {"(PublicKey).Bytes", Method, 26, ""}, + {"(PublicKey).KEM", Method, 26, ""}, + {"AES128GCM", Func, 26, "func() AEAD"}, + {"AES256GCM", Func, 26, "func() AEAD"}, + {"ChaCha20Poly1305", Func, 26, "func() AEAD"}, + {"DHKEM", Func, 26, "func(curve ecdh.Curve) KEM"}, + {"ExportOnly", Func, 26, "func() AEAD"}, + {"HKDFSHA256", Func, 26, "func() KDF"}, + {"HKDFSHA384", Func, 26, "func() KDF"}, + {"HKDFSHA512", Func, 26, "func() KDF"}, + {"MLKEM1024", Func, 26, "func() KEM"}, + {"MLKEM1024P384", Func, 26, "func() KEM"}, + {"MLKEM768", Func, 26, "func() KEM"}, + {"MLKEM768P256", Func, 26, "func() KEM"}, + {"MLKEM768X25519", Func, 26, "func() KEM"}, + {"NewAEAD", Func, 26, "func(id uint16) (AEAD, error)"}, + {"NewDHKEMPrivateKey", Func, 26, "func(priv ecdh.KeyExchanger) (PrivateKey, error)"}, + {"NewDHKEMPublicKey", Func, 26, "func(pub *ecdh.PublicKey) (PublicKey, error)"}, + {"NewHybridPrivateKey", Func, 26, "func(pq crypto.Decapsulator, t ecdh.KeyExchanger) (PrivateKey, error)"}, + {"NewHybridPublicKey", Func, 26, "func(pq crypto.Encapsulator, t *ecdh.PublicKey) (PublicKey, error)"}, + {"NewKDF", Func, 26, "func(id uint16) (KDF, error)"}, + {"NewKEM", Func, 26, "func(id uint16) (KEM, error)"}, + {"NewMLKEMPrivateKey", Func, 26, "func(priv crypto.Decapsulator) (PrivateKey, error)"}, + {"NewMLKEMPublicKey", Func, 26, "func(pub crypto.Encapsulator) (PublicKey, error)"}, + {"NewRecipient", Func, 26, "func(enc []byte, k PrivateKey, kdf KDF, aead AEAD, info []byte) (*Recipient, error)"}, + {"NewSender", Func, 26, "func(pk PublicKey, kdf KDF, aead AEAD, info []byte) (enc []byte, s *Sender, err error)"}, + {"Open", Func, 26, "func(k PrivateKey, kdf KDF, aead AEAD, info []byte, ciphertext []byte) ([]byte, error)"}, + {"Recipient", Type, 26, ""}, + {"SHAKE128", Func, 26, "func() KDF"}, + {"SHAKE256", Func, 26, "func() KDF"}, + {"Seal", Func, 26, "func(pk PublicKey, kdf KDF, aead AEAD, info []byte, plaintext []byte) ([]byte, error)"}, + {"Sender", Type, 26, ""}, + }, "crypto/md5": { {"BlockSize", Const, 0, ""}, {"New", Func, 0, "func() hash.Hash"}, @@ -801,7 +851,7 @@ var PackageSymbols = map[string][]Symbol{ }, "crypto/rand": { {"Int", Func, 0, "func(rand io.Reader, max *big.Int) (n *big.Int, err error)"}, - {"Prime", Func, 0, "func(rand io.Reader, bits int) (*big.Int, error)"}, + {"Prime", Func, 0, "func(r io.Reader, bits int) (*big.Int, error)"}, {"Read", Func, 0, "func(b []byte) (n int, err error)"}, {"Reader", Var, 0, ""}, {"Text", Func, 24, "func() string"}, @@ -865,7 +915,7 @@ var PackageSymbols = map[string][]Symbol{ {"PublicKey.E", Field, 0, ""}, {"PublicKey.N", Field, 0, ""}, {"SignPKCS1v15", Func, 0, "func(random io.Reader, priv *PrivateKey, hash crypto.Hash, hashed []byte) ([]byte, error)"}, - {"SignPSS", Func, 2, "func(rand io.Reader, priv *PrivateKey, hash crypto.Hash, digest []byte, opts *PSSOptions) ([]byte, error)"}, + {"SignPSS", Func, 2, "func(random io.Reader, priv *PrivateKey, hash crypto.Hash, digest []byte, opts *PSSOptions) ([]byte, error)"}, {"VerifyPKCS1v15", Func, 0, "func(pub *PublicKey, hash crypto.Hash, hashed []byte, sig []byte) error"}, {"VerifyPSS", Func, 2, "func(pub *PublicKey, hash crypto.Hash, digest []byte, sig []byte, opts *PSSOptions) error"}, }, @@ -1158,6 +1208,8 @@ var PackageSymbols = map[string][]Symbol{ {"RequestClientCert", Const, 0, ""}, {"RequireAndVerifyClientCert", Const, 0, ""}, {"RequireAnyClientCert", Const, 0, ""}, + {"SecP256r1MLKEM768", Const, 26, ""}, + {"SecP384r1MLKEM1024", Const, 26, ""}, {"Server", Func, 0, "func(conn net.Conn, config *Config) *Conn"}, {"SessionState", Type, 21, ""}, {"SessionState.EarlyData", Field, 21, ""}, @@ -1222,6 +1274,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*RevocationList).CheckSignatureFrom", Method, 19, ""}, {"(CertificateInvalidError).Error", Method, 0, ""}, {"(ConstraintViolationError).Error", Method, 0, ""}, + {"(ExtKeyUsage).OID", Method, 26, ""}, {"(ExtKeyUsage).String", Method, 26, ""}, {"(HostnameError).Error", Method, 0, ""}, {"(InsecureAlgorithmError).Error", Method, 6, ""}, @@ -1380,6 +1433,7 @@ var PackageSymbols = map[string][]Symbol{ {"NoValidChains", Const, 24, ""}, {"NotAuthorizedToSign", Const, 0, ""}, {"OID", Type, 22, ""}, + {"OIDFromASN1OID", Func, 26, "func(asn1OID asn1.ObjectIdentifier) (OID, error)"}, {"OIDFromInts", Func, 22, "func(oid []uint64) (OID, error)"}, {"PEMCipher", Type, 1, ""}, {"PEMCipher3DES", Const, 1, ""}, @@ -1690,10 +1744,6 @@ var PackageSymbols = map[string][]Symbol{ {"(Rows).Next", Method, 0, ""}, {"(RowsAffected).LastInsertId", Method, 0, ""}, {"(RowsAffected).RowsAffected", Method, 0, ""}, - {"(RowsColumnScanner).Close", Method, 26, ""}, - {"(RowsColumnScanner).Columns", Method, 26, ""}, - {"(RowsColumnScanner).Next", Method, 26, ""}, - {"(RowsColumnScanner).ScanColumn", Method, 26, ""}, {"(RowsColumnTypeDatabaseTypeName).Close", Method, 8, ""}, {"(RowsColumnTypeDatabaseTypeName).ColumnTypeDatabaseTypeName", Method, 8, ""}, {"(RowsColumnTypeDatabaseTypeName).Columns", Method, 8, ""}, @@ -1765,7 +1815,6 @@ var PackageSymbols = map[string][]Symbol{ {"ResultNoRows", Var, 0, ""}, {"Rows", Type, 0, ""}, {"RowsAffected", Type, 0, ""}, - {"RowsColumnScanner", Type, 26, ""}, {"RowsColumnTypeDatabaseTypeName", Type, 8, ""}, {"RowsColumnTypeLength", Type, 8, ""}, {"RowsColumnTypeNullable", Type, 8, ""}, @@ -17367,6 +17416,9 @@ var PackageSymbols = map[string][]Symbol{ {"Testing", Func, 21, "func() bool"}, {"Verbose", Func, 1, "func() bool"}, }, + "testing/cryptotest": { + {"SetGlobalRandom", Func, 26, "func(t *testing.T, seed uint64)"}, + }, "testing/fstest": { {"(MapFS).Glob", Method, 16, ""}, {"(MapFS).Lstat", Method, 25, ""}, diff --git a/vendor/modules.txt b/vendor/modules.txt index 9e63c4709..744dbb256 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,8 +1,8 @@ # dario.cat/mergo v1.0.2 ## explicit; go 1.13 dario.cat/mergo -# github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0 -## explicit; go 1.23.0 +# github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0 +## explicit; go 1.24.0 github.com/Azure/azure-sdk-for-go/sdk/azcore github.com/Azure/azure-sdk-for-go/sdk/azcore/arm github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource @@ -196,7 +196,7 @@ github.com/aws/aws-sdk-go-v2/internal/v4a/internal/v4 github.com/aws/aws-sdk-go-v2/service/ec2 github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ec2/types -# github.com/aws/aws-sdk-go-v2/service/ecs v1.70.1 +# github.com/aws/aws-sdk-go-v2/service/ecs v1.71.0 ## explicit; go 1.23 github.com/aws/aws-sdk-go-v2/service/ecs github.com/aws/aws-sdk-go-v2/service/ecs/document @@ -463,7 +463,7 @@ github.com/go-playground/universal-translator # github.com/go-playground/validator/v10 v10.30.1 ## explicit; go 1.24.0 github.com/go-playground/validator/v10 -# github.com/go-viper/mapstructure/v2 v2.4.0 +# github.com/go-viper/mapstructure/v2 v2.5.0 ## explicit; go 1.18 github.com/go-viper/mapstructure/v2 github.com/go-viper/mapstructure/v2/internal/errors @@ -621,13 +621,13 @@ github.com/pulumi/esc/internal/util github.com/pulumi/esc/schema github.com/pulumi/esc/syntax github.com/pulumi/esc/syntax/encoding -# github.com/pulumi/pulumi-aws-native/sdk v1.47.0 +# github.com/pulumi/pulumi-aws-native/sdk v1.49.0 ## explicit; go 1.24.7 github.com/pulumi/pulumi-aws-native/sdk/go/aws github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal github.com/pulumi/pulumi-aws-native/sdk/go/aws/scheduler github.com/pulumi/pulumi-aws-native/sdk/go/aws/ssm -# github.com/pulumi/pulumi-aws/sdk/v7 v7.15.0 +# github.com/pulumi/pulumi-aws/sdk/v7 v7.16.0 ## explicit; go 1.24.0 github.com/pulumi/pulumi-aws/sdk/v7/go/aws github.com/pulumi/pulumi-aws/sdk/v7/go/aws/autoscaling @@ -680,7 +680,7 @@ github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal ## explicit; go 1.24.0 github.com/pulumi/pulumi-docker/sdk/v4/go/docker github.com/pulumi/pulumi-docker/sdk/v4/go/docker/internal -# github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.24.1 +# github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.25.0 ## explicit; go 1.24.7 github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/admissionregistration/v1 @@ -748,7 +748,7 @@ github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/storage/v1beta1 github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/storagemigration/v1alpha1 github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/utilities github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/yaml -# github.com/pulumi/pulumi-random/sdk/v4 v4.18.5 +# github.com/pulumi/pulumi-random/sdk/v4 v4.19.0 ## explicit; go 1.24.0 github.com/pulumi/pulumi-random/sdk/v4/go/random github.com/pulumi/pulumi-random/sdk/v4/go/random/internal @@ -756,7 +756,7 @@ github.com/pulumi/pulumi-random/sdk/v4/go/random/internal ## explicit; go 1.23.11 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.215.0 +# github.com/pulumi/pulumi/sdk/v3 v3.216.0 ## explicit; go 1.24.0 github.com/pulumi/pulumi/sdk/v3 github.com/pulumi/pulumi/sdk/v3/go/auto @@ -917,7 +917,7 @@ go.uber.org/multierr # go.yaml.in/yaml/v3 v3.0.4 ## explicit; go 1.16 go.yaml.in/yaml/v3 -# golang.org/x/crypto v0.46.0 +# golang.org/x/crypto v0.47.0 ## explicit; go 1.24.0 golang.org/x/crypto/argon2 golang.org/x/crypto/blake2b @@ -938,14 +938,14 @@ golang.org/x/crypto/ssh golang.org/x/crypto/ssh/agent golang.org/x/crypto/ssh/internal/bcrypt_pbkdf golang.org/x/crypto/ssh/knownhosts -# golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93 +# golang.org/x/exp v0.0.0-20260112195511-716be5621a96 ## explicit; go 1.24.0 golang.org/x/exp/maps golang.org/x/exp/slices -# golang.org/x/mod v0.31.0 +# golang.org/x/mod v0.32.0 ## explicit; go 1.24.0 golang.org/x/mod/semver -# golang.org/x/net v0.48.0 +# golang.org/x/net v0.49.0 ## explicit; go 1.24.0 golang.org/x/net/context golang.org/x/net/http/httpguts @@ -968,10 +968,10 @@ golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows golang.org/x/sys/windows/registry -# golang.org/x/term v0.38.0 +# golang.org/x/term v0.39.0 ## explicit; go 1.24.0 golang.org/x/term -# golang.org/x/text v0.32.0 +# golang.org/x/text v0.33.0 ## explicit; go 1.24.0 golang.org/x/text/encoding golang.org/x/text/encoding/internal @@ -987,7 +987,7 @@ golang.org/x/text/secure/bidirule golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm -# golang.org/x/tools v0.40.0 +# golang.org/x/tools v0.41.0 ## explicit; go 1.24.0 golang.org/x/tools/cmd/stringer golang.org/x/tools/go/ast/edge @@ -1009,7 +1009,7 @@ golang.org/x/tools/internal/stdlib golang.org/x/tools/internal/typeparams golang.org/x/tools/internal/typesinternal golang.org/x/tools/internal/versions -# google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b +# google.golang.org/genproto/googleapis/rpc v0.0.0-20260114163908-3f89685c29c3 ## explicit; go 1.24.0 google.golang.org/genproto/googleapis/rpc/status # google.golang.org/grpc v1.78.0