vendor: run make vendor-update

This commit is contained in:
Aliaksandr Valialkin 2024-01-16 16:57:30 +02:00
parent 9d886a2eb0
commit 6eae3f6c8a
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB
224 changed files with 12557 additions and 5593 deletions

83
go.mod
View file

@ -3,9 +3,9 @@ module github.com/VictoriaMetrics/VictoriaMetrics
go 1.20
require (
cloud.google.com/go/storage v1.35.1
cloud.google.com/go/storage v1.36.0
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1
github.com/VictoriaMetrics/easyproto v0.1.4
github.com/VictoriaMetrics/fastcache v1.12.2
@ -14,58 +14,58 @@ require (
github.com/VictoriaMetrics/fasthttp v1.2.0
github.com/VictoriaMetrics/metrics v1.31.0
github.com/VictoriaMetrics/metricsql v0.70.0
github.com/aws/aws-sdk-go-v2 v1.24.0
github.com/aws/aws-sdk-go-v2/config v1.26.1
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7
github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5
github.com/aws/aws-sdk-go-v2 v1.24.1
github.com/aws/aws-sdk-go-v2/config v1.26.3
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.11
github.com/aws/aws-sdk-go-v2/service/s3 v1.48.0
github.com/bmatcuk/doublestar/v4 v4.6.1
github.com/cespare/xxhash/v2 v2.2.0
github.com/cheggaaa/pb/v3 v3.1.4
github.com/gogo/protobuf v1.3.2
github.com/golang/snappy v0.0.4
github.com/googleapis/gax-go/v2 v2.12.0
github.com/influxdata/influxdb v1.11.2
github.com/influxdata/influxdb v1.11.4
github.com/klauspost/compress v1.17.4
github.com/prometheus/prometheus v0.48.1
github.com/urfave/cli/v2 v2.26.0
github.com/urfave/cli/v2 v2.27.1
github.com/valyala/fastjson v1.6.4
github.com/valyala/fastrand v1.1.0
github.com/valyala/fasttemplate v1.2.2
github.com/valyala/gozstd v1.20.1
github.com/valyala/histogram v1.2.0
github.com/valyala/quicktemplate v1.7.0
golang.org/x/net v0.19.0
golang.org/x/oauth2 v0.15.0
golang.org/x/sys v0.15.0
google.golang.org/api v0.154.0
golang.org/x/net v0.20.0
golang.org/x/oauth2 v0.16.0
golang.org/x/sys v0.16.0
google.golang.org/api v0.156.0
gopkg.in/yaml.v2 v2.4.0
)
require (
cloud.google.com/go v0.111.0 // indirect
cloud.google.com/go v0.112.0 // indirect
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.5 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 // indirect
github.com/VividCortex/ewma v1.2.0 // indirect
github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect
github.com/aws/aws-sdk-go v1.49.1 // indirect
github.com/aws/aws-sdk-go v1.49.21 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.16.12 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.16.14 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.10 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.18.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.26.5 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.18.6 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.6 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 // indirect
github.com/aws/smithy-go v1.19.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
@ -75,7 +75,7 @@ require (
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang-jwt/jwt/v5 v5.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
@ -91,27 +91,26 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.17.0 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/common v0.46.0 // indirect
github.com/prometheus/common/sigv4 v0.1.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/collector/pdata v1.0.0 // indirect
go.opentelemetry.io/collector/semconv v0.91.0 // indirect
go.opentelemetry.io/collector/pdata v1.0.1 // indirect
go.opentelemetry.io/collector/semconv v0.92.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect
go.opentelemetry.io/otel v1.21.0 // indirect
@ -120,17 +119,17 @@ require (
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/goleak v1.3.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect
google.golang.org/grpc v1.60.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/genproto v0.0.0-20240108191215-35c7eff3a6b1 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240108191215-35c7eff3a6b1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect
google.golang.org/grpc v1.60.1 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

176
go.sum
View file

@ -13,8 +13,8 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
cloud.google.com/go v0.111.0 h1:YHLKNupSD1KqjDbQ3+LVdQ81h/UJbJyZG203cEfnQgM=
cloud.google.com/go v0.111.0/go.mod h1:0mibmpKP1TyOOFYQY5izo0LnT+ecvOQ0Sg3OdmMiNRU=
cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM=
cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
@ -38,8 +38,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w=
cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8=
cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8=
cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 h1:lGlwhPtrX6EVml1hO0ivjkUxsSyl4dsiw9qcA1k/3IQ=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1/go.mod h1:RKUqNu35KJYcVG/fqTRqmuXJZYNhYkBrnC/hX7yGbTA=
@ -50,11 +50,11 @@ github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1/go.mod h1:s4kgfzA0covAXNic
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 h1:UPeCRD+XY7QlaGQte2EVI2iOcWvUYA2XY8w5T/8v0NQ=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 h1:QM6sE5k2ZT/vI5BEe0r7mqjsUSnhVBFbOsVkEuaEfiA=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 h1:bWh0Z2rOEDfB/ywv/l0iHN1JgyazE6kW/aIA89+CEK0=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0 h1:Ma67P/GGprNwsslzEH6+Kb8nybI8jpDTm4Wmzu2ReK8=
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 h1:gggzg0SUMs6SQbEw+3LoSsYf9YMjkupeAnHMX8O9mmY=
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0/go.mod h1:+6KLcKIVgxoBDMqMO/Nvy7bZ9a0nbU3I1DtFQK3YvB4=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0 h1:hVeq+yCyUi+MsoO/CU95yqCIcdzra5ovzk8Q2BBpV2M=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70=
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1 h1:AMf7YbZOZIW5b66cXNHMWWT/zkjhz5+a+k/3x40EO7E=
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1/go.mod h1:uwfk06ZBcvL/g4VHNjurPfVln9NMbsk2XIZxJ+hu81k=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
@ -84,44 +84,44 @@ github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu
github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA=
github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go v1.49.1 h1:Dsamcd8d/nNb3A+bZ0ucfGl0vGZsW5wlRW0vhoYGoeQ=
github.com/aws/aws-sdk-go v1.49.1/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go-v2 v1.24.0 h1:890+mqQ+hTpNuw0gGP6/4akolQkSToDJgHfQE7AwGuk=
github.com/aws/aws-sdk-go-v2 v1.24.0/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4=
github.com/aws/aws-sdk-go v1.49.21 h1:Rl8KW6HqkwzhATwvXhyr7vD4JFUMi7oXGAw9SrxxIFY=
github.com/aws/aws-sdk-go v1.49.21/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go-v2 v1.24.1 h1:xAojnj+ktS95YZlDf0zxWBkbFtymPeDP+rvUQIH3uAU=
github.com/aws/aws-sdk-go-v2 v1.24.1/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 h1:OCs21ST2LrepDfD3lwlQiOqIGp6JiEUqG84GzTDoyJs=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4/go.mod h1:usURWEKSNNAcAZuzRn/9ZYPT8aZQkR7xcCtunK/LkJo=
github.com/aws/aws-sdk-go-v2/config v1.26.1 h1:z6DqMxclFGL3Zfo+4Q0rLnAZ6yVkzCRxhRMsiRQnD1o=
github.com/aws/aws-sdk-go-v2/config v1.26.1/go.mod h1:ZB+CuKHRbb5v5F0oJtGdhFTelmrxd4iWO1lf0rQwSAg=
github.com/aws/aws-sdk-go-v2/credentials v1.16.12 h1:v/WgB8NxprNvr5inKIiVVrXPuuTegM+K8nncFkr1usU=
github.com/aws/aws-sdk-go-v2/credentials v1.16.12/go.mod h1:X21k0FjEJe+/pauud82HYiQbEr9jRKY3kXEIQ4hXeTQ=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 h1:w98BT5w+ao1/r5sUuiH6JkVzjowOKeOJRHERyy1vh58=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10/go.mod h1:K2WGI7vUvkIv1HoNbfBA1bvIZ+9kL3YVmWxeKuLQsiw=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7 h1:FnLf60PtjXp8ZOzQfhJVsqF0OtYKQZWQfqOLshh8YXg=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7/go.mod h1:tDVvl8hyU6E9B8TrnNrZQEVkQlB8hjJwcgpPhgtlnNg=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 h1:v+HbZaCGmOwnTTVS86Fleq0vPzOd7tnJGbFhP0stNLs=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9/go.mod h1:Xjqy+Nyj7VDLBtCMkQYOw1QYfAEZCVLrfI0ezve8wd4=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 h1:N94sVhRACtXyVcjXxrwK1SKFIJrA9pOJ5yu2eSHnmls=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9/go.mod h1:hqamLz7g1/4EJP+GH5NBhcUMLjW+gKLQabgyz6/7WAU=
github.com/aws/aws-sdk-go-v2/config v1.26.3 h1:dKuc2jdp10y13dEEvPqWxqLoc0vF3Z9FC45MvuQSxOA=
github.com/aws/aws-sdk-go-v2/config v1.26.3/go.mod h1:Bxgi+DeeswYofcYO0XyGClwlrq3DZEXli0kLf4hkGA0=
github.com/aws/aws-sdk-go-v2/credentials v1.16.14 h1:mMDTwwYO9A0/JbOCOG7EOZHtYM+o7OfGWfu0toa23VE=
github.com/aws/aws-sdk-go-v2/credentials v1.16.14/go.mod h1:cniAUh3ErQPHtCQGPT5ouvSAQ0od8caTO9OOuufZOAE=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 h1:c5I5iH+DZcH3xOIMlz3/tCKJDaHFwYEmxvlh2fAcFo8=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11/go.mod h1:cRrYDYAMUohBJUtUnOhydaMHtiK/1NZ0Otc9lIb6O0Y=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.11 h1:I6lAa3wBWfCz/cKkOpAcumsETRkFAl70sWi8ItcMEsM=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.11/go.mod h1:be1NIO30kJA23ORBLqPo1LttEM6tPNSEcjkd1eKzNW0=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 h1:vF+Zgd9s+H4vOXd5BMaPWykta2a6Ih0AKLq/X6NYKn4=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10/go.mod h1:6BkRjejp/GR4411UGqkX8+wFMbFbqsUIimfK4XjOKR4=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 h1:nYPe006ktcqUji8S2mqXf9c/7NdiKriOwMvWQHgYztw=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10/go.mod h1:6UV4SZkVvmODfXKql4LCbaZUpF7HO2BX38FgBf9ZOLw=
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 h1:GrSw8s0Gs/5zZ0SX+gX4zQjRnRsMJDJ2sLur1gRBhEM=
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9 h1:ugD6qzjYtB7zM5PN/ZIeaAIyefPaD82G8+SJopgvUpw=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9/go.mod h1:YD0aYBWCrPENpHolhKw2XDlTIWae2GKXT1T4o6N6hiM=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.10 h1:5oE2WzJE56/mVveuDZPJESKlg/00AaS2pY2QZcnxg4M=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.10/go.mod h1:FHbKWQtRBYUz4vO5WBWjzMD2by126ny5y/1EoaWoLfI=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 h1:/b31bi3YVNlkzkBrm9LfpaKoaYZUxIAj4sHfOTmLfqw=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4/go.mod h1:2aGXHFmbInwgP9ZfpmdIfOELL79zhdNYNmReK8qDfdQ=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9 h1:/90OR2XbSYfXucBMJ4U14wrjlfleq/0SB6dZDPncgmo=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9/go.mod h1:dN/Of9/fNZet7UrQQ6kTDo/VSwKPIq94vjlU16bRARc=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9 h1:Nf2sHxjMJR8CSImIVCONRi4g0Su3J+TSTbS7G0pUeMU=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9/go.mod h1:idky4TER38YIjr2cADF1/ugFMKvZV7p//pVeV5LZbF0=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9 h1:iEAeF6YC3l4FzlJPP9H3Ko1TXpdjdqWffxXjp8SY6uk=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9/go.mod h1:kjsXoK23q9Z/tLBrckZLLyvjhZoS+AGrzqzUfEClvMM=
github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5 h1:Keso8lIOS+IzI2MkPZyK6G0LYcK3My2LQ+T5bxghEAY=
github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5/go.mod h1:vADO6Jn+Rq4nDtfwNjhgR84qkZwiC6FqCaXdw/kYwjA=
github.com/aws/aws-sdk-go-v2/service/sso v1.18.5 h1:ldSFWz9tEHAwHNmjx2Cvy1MjP5/L9kNoR0skc6wyOOM=
github.com/aws/aws-sdk-go-v2/service/sso v1.18.5/go.mod h1:CaFfXLYL376jgbP7VKC96uFcU8Rlavak0UlAwk1Dlhc=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5 h1:2k9KmFawS63euAkY4/ixVNsYYwrwnd5fIvgEKkfZFNM=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5/go.mod h1:W+nd4wWDVkSUIox9bacmkBP5NMFQeTJ/xqNabpzSR38=
github.com/aws/aws-sdk-go-v2/service/sts v1.26.5 h1:5UYvv8JUvllZsRnfrcMQ+hJ9jNICmcgKPAO1CER25Wg=
github.com/aws/aws-sdk-go-v2/service/sts v1.26.5/go.mod h1:XX5gh4CB7wAs4KhcF46G6C8a2i7eupU19dcAAE+EydU=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10 h1:L0ai8WICYHozIKK+OtPzVJBugL7culcuM4E4JOpIEm8=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10/go.mod h1:byqfyxJBshFk0fF9YmK0M0ugIO8OWjzH2T3bPG4eGuA=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 h1:DBYTXwIGQSGs9w4jKm60F5dmCQ3EEruxdc0MFh+3EY4=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10/go.mod h1:wohMUQiFdzo0NtxbBg0mSRGZ4vL3n0dKjLTINdcIino=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10 h1:KOxnQeWy5sXyS37fdKEvAsGHOr9fa/qvwxfJurR/BzE=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10/go.mod h1:jMx5INQFYFYB3lQD9W0D8Ohgq6Wnl7NYOJ2TQndbulI=
github.com/aws/aws-sdk-go-v2/service/s3 v1.48.0 h1:PJTdBMsyvra6FtED7JZtDpQrIAflYDHFoZAu/sKYkwU=
github.com/aws/aws-sdk-go-v2/service/s3 v1.48.0/go.mod h1:4qXHrG1Ne3VGIMZPCB8OjH/pLFO94sKABIusjh0KWPU=
github.com/aws/aws-sdk-go-v2/service/sso v1.18.6 h1:dGrs+Q/WzhsiUKh82SfTVN66QzyulXuMDTV/G8ZxOac=
github.com/aws/aws-sdk-go-v2/service/sso v1.18.6/go.mod h1:+mJNDdF+qiUlNKNC3fxn74WWNN+sOiGOEImje+3ScPM=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.6 h1:Yf2MIo9x+0tyv76GljxzqA3WtC5mw7NmazD2chwjxE4=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.6/go.mod h1:ykf3COxYI0UJmxcfcxcVuz7b6uADi1FkiUz6Eb7AgM8=
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 h1:NzO4Vrau795RkUdSHKEwiR01FaGzGOH1EETJ+5QHnm0=
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7/go.mod h1:6h2YuIoxaMSCFf5fi1EgZAwdfkGMgDY+DVfa61uLe4U=
github.com/aws/smithy-go v1.19.0 h1:KWFKQV80DpP3vJrrA9sVAHQ5gc2z8i4EzrLhLlWXcBM=
github.com/aws/smithy-go v1.19.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
@ -183,8 +183,8 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG
github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4=
github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY=
github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ=
@ -293,8 +293,8 @@ github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY
github.com/hetznercloud/hcloud-go/v2 v2.4.0 h1:MqlAE+w125PLvJRCpAJmEwrIxoVdUdOyuFUhE/Ukbok=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
github.com/influxdata/influxdb v1.11.2 h1:qOF3uQN1mDfJNEKwbAgJsqehf8IXgKok2vlGm736oGo=
github.com/influxdata/influxdb v1.11.2/go.mod h1:eUMkLTE2vQwvSk6KGMrTBLKPaqSuczuelGbggigMPFw=
github.com/influxdata/influxdb v1.11.4 h1:H3pVW+/tWQ4lkHhZxVQ13Ov1hmhHYaAzz8L5aq3ZNtw=
github.com/influxdata/influxdb v1.11.4/go.mod h1:VO6X2zlamfmEf+Esc9dR+7UQhdE/krspWNEZPwxCrp0=
github.com/ionos-cloud/sdk-go/v6 v6.1.9 h1:Iq3VIXzeEbc8EbButuACgfLMiY5TPVWUPNrF+Vsddo4=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
@ -339,8 +339,6 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k=
github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
@ -360,8 +358,8 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=
github.com/ovh/go-ovh v1.4.3 h1:Gs3V823zwTFpzgGLZNI6ILS4rmxZgJwJCz54Er9LwD0=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@ -373,8 +371,8 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q=
github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY=
github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk=
github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@ -385,8 +383,8 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM=
github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY=
github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y=
github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ=
github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4=
github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
@ -423,8 +421,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/urfave/cli/v2 v2.26.0 h1:3f3AMg3HpThFNT4I++TKOejZO8yU55t3JnnSr4S4QEI=
github.com/urfave/cli/v2 v2.26.0/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho=
github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus=
@ -442,8 +440,8 @@ github.com/valyala/quicktemplate v1.7.0 h1:LUPTJmlVcb46OOUY3IeD9DojFpAVbsG+5WFTc
github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8=
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e h1:+SOyEddqYF09QP7vr7CgJ1eti3pY9Fn3LHO1M1r/0sI=
github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@ -456,10 +454,10 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
go.opentelemetry.io/collector/pdata v1.0.0 h1:ECP2jnLztewsHmL1opL8BeMtWVc7/oSlKNhfY9jP8ec=
go.opentelemetry.io/collector/pdata v1.0.0/go.mod h1:TsDFgs4JLNG7t6x9D8kGswXUz4mme+MyNChHx8zSF6k=
go.opentelemetry.io/collector/semconv v0.91.0 h1:TRd+yDDfKQl+aNtS24wmEbJp1/QE/xAFV9SB5zWGxpE=
go.opentelemetry.io/collector/semconv v0.91.0/go.mod h1:j/8THcqVxFna1FpvA2zYIsUperEtOaRaqoLYIN4doWw=
go.opentelemetry.io/collector/pdata v1.0.1 h1:dGX2h7maA6zHbl5D3AsMnF1c3Nn+3EUftbVCLzeyNvA=
go.opentelemetry.io/collector/pdata v1.0.1/go.mod h1:jutXeu0QOXYY8wcZ/hege+YAnSBP3+jpTqYU1+JTI5Y=
go.opentelemetry.io/collector/semconv v0.92.0 h1:3+OGPPuVu4rtrz8qGbpbiw7eKKULj4iJaSDTV52HM40=
go.opentelemetry.io/collector/semconv v0.92.0/go.mod h1:gZ0uzkXsN+J5NpiRcdp9xOhNGQDDui8Y62p15sKrlzo=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24=
@ -468,7 +466,7 @@ go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4=
go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM=
go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o=
go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8=
go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc=
go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
@ -485,8 +483,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@ -497,8 +495,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb h1:c0vyKkb6yr3KR7jEfJaOSv4lG7xPkbN6r52aJz1d8a8=
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI=
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o=
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@ -555,16 +553,16 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ=
golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM=
golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ=
golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@ -576,8 +574,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@ -616,19 +614,19 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@ -687,7 +685,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM=
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
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=
@ -710,8 +708,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
google.golang.org/api v0.154.0 h1:X7QkVKZBskztmpPKWQXgjJRPA2dJYrL6r+sYPRLj050=
google.golang.org/api v0.154.0/go.mod h1:qhSMkM85hgqiokIYsrRyKxrjfBeIhgl4Z2JmeRkYylc=
google.golang.org/api v0.156.0 h1:yloYcGbBtVYjLKQe4enCunxvwn3s2w/XPrrhVf6MsvQ=
google.golang.org/api v0.156.0/go.mod h1:bUSmn4KFO0Q+69zo9CNIDp4Psi6BqM0np0CbzKRSiSY=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@ -749,12 +747,12 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 h1:YJ5pD9rF8o9Qtta0Cmy9rdBwkSjrTCT6XTiUQVOtIos=
google.golang.org/genproto v0.0.0-20231212172506-995d672761c0/go.mod h1:l/k7rMz0vFTBPy+tFSGvXEd3z+BcoG1k7EHbqm+YBsY=
google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 h1:s1w3X6gQxwrLEpxnLd/qXTVLgQE2yXwaOaoa6IlY/+o=
google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0/go.mod h1:CAny0tYF+0/9rmDB9fahA9YLzX3+AEVl1qXbv5hhj6c=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 h1:/jFB8jK5R3Sq3i/lmeZO0cATSzFfZaJq1J2Euan3XKU=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA=
google.golang.org/genproto v0.0.0-20240108191215-35c7eff3a6b1 h1:/IWabOtPziuXTEtI1KYCpM6Ss7vaAkeMxk+uXV/xvZs=
google.golang.org/genproto v0.0.0-20240108191215-35c7eff3a6b1/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k=
google.golang.org/genproto/googleapis/api v0.0.0-20240108191215-35c7eff3a6b1 h1:OPXtXn7fNMaXwO3JvOmF1QyTc00jsSFFz1vXXBOdCDo=
google.golang.org/genproto/googleapis/api v0.0.0-20240108191215-35c7eff3a6b1/go.mod h1:B5xPO//w8qmBDjGReYLpR6UJPnkldGkCSMoH/2vxJeg=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 h1:gphdwh0npgs8elJ4T6J+DQJHPVF7RsuJHCfwztUb4J4=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@ -768,8 +766,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.60.0 h1:6FQAR0kM31P6MRdeluor2w2gPaS4SVNrD/DNTxrQ15k=
google.golang.org/grpc v1.60.0/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM=
google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU=
google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@ -782,8 +780,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

View file

@ -29,6 +29,26 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/ai/generativelanguage/apiv1": {
"api_shortname": "generativelanguage",
"distribution_name": "cloud.google.com/go/ai/generativelanguage/apiv1",
"description": "Generative Language API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/ai/latest/generativelanguage/apiv1",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/ai/generativelanguage/apiv1beta": {
"api_shortname": "generativelanguage",
"distribution_name": "cloud.google.com/go/ai/generativelanguage/apiv1beta",
"description": "Generative Language API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/ai/latest/generativelanguage/apiv1beta",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/ai/generativelanguage/apiv1beta2": {
"api_shortname": "generativelanguage",
"distribution_name": "cloud.google.com/go/ai/generativelanguage/apiv1beta2",
@ -179,6 +199,16 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/apps/meet/apiv2beta": {
"api_shortname": "meet",
"distribution_name": "cloud.google.com/go/apps/meet/apiv2beta",
"description": "Google Meet API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/apps/latest/meet/apiv2beta",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/area120/tables/apiv1alpha1": {
"api_shortname": "area120tables",
"distribution_name": "cloud.google.com/go/area120/tables/apiv1alpha1",
@ -629,6 +659,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/cloudquotas/apiv1": {
"api_shortname": "cloudquotas",
"distribution_name": "cloud.google.com/go/cloudquotas/apiv1",
"description": "Cloud Quotas API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/cloudquotas/latest/apiv1",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/cloudtasks/apiv2": {
"api_shortname": "cloudtasks",
"distribution_name": "cloud.google.com/go/cloudtasks/apiv2",
@ -969,6 +1009,16 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/discoveryengine/apiv1alpha": {
"api_shortname": "discoveryengine",
"distribution_name": "cloud.google.com/go/discoveryengine/apiv1alpha",
"description": "Discovery Engine API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/discoveryengine/latest/apiv1alpha",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/discoveryengine/apiv1beta": {
"api_shortname": "discoveryengine",
"distribution_name": "cloud.google.com/go/discoveryengine/apiv1beta",
@ -2099,6 +2149,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/securitycentermanagement/apiv1": {
"api_shortname": "securitycentermanagement",
"distribution_name": "cloud.google.com/go/securitycentermanagement/apiv1",
"description": "Security Center Management API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/securitycentermanagement/latest/apiv1",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/servicecontrol/apiv1": {
"api_shortname": "servicecontrol",
"distribution_name": "cloud.google.com/go/servicecontrol/apiv1",
@ -2159,6 +2219,16 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/shopping/css/apiv1": {
"api_shortname": "css",
"distribution_name": "cloud.google.com/go/shopping/css/apiv1",
"description": "CSS API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/css/apiv1",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/shopping/merchant/inventories/apiv1beta": {
"api_shortname": "merchantapi",
"distribution_name": "cloud.google.com/go/shopping/merchant/inventories/apiv1beta",
@ -2209,6 +2279,16 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/spanner/executor/apiv1": {
"api_shortname": "spanner-cloud-executor",
"distribution_name": "cloud.google.com/go/spanner/executor/apiv1",
"description": "Cloud Spanner Executor test API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/spanner/latest/executor/apiv1",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/speech/apiv1": {
"api_shortname": "speech",
"distribution_name": "cloud.google.com/go/speech/apiv1",

View file

@ -32,16 +32,33 @@ import (
)
const (
telemetryPlatformTracingOpenCensus = "opencensus"
telemetryPlatformTracingOpenTelemetry = "opentelemetry"
telemetryPlatformTracingVar = "GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING"
// TelemetryPlatformTracingOpenCensus is the value to which the environment
// variable GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING should be
// set to enable OpenCensus tracing.
TelemetryPlatformTracingOpenCensus = "opencensus"
// TelemetryPlatformTracingOpenCensus is the value to which the environment
// variable GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING should be
// set to enable OpenTelemetry tracing.
TelemetryPlatformTracingOpenTelemetry = "opentelemetry"
// TelemetryPlatformTracingOpenCensus is the name of the environment
// variable that can be set to change the default tracing from OpenCensus
// to OpenTelemetry.
TelemetryPlatformTracingVar = "GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING"
// OpenTelemetryTracerName is the name given to the OpenTelemetry Tracer
// when it is obtained from the OpenTelemetry TracerProvider.
OpenTelemetryTracerName = "cloud.google.com/go"
)
var (
// TODO(chrisdsmith): Should the name of the OpenTelemetry tracer be public and mutable?
openTelemetryTracerName string = "cloud.google.com/go"
openTelemetryTracingEnabled bool = strings.EqualFold(strings.TrimSpace(
os.Getenv(telemetryPlatformTracingVar)), telemetryPlatformTracingOpenTelemetry)
// OpenTelemetryTracingEnabled is true if the environment variable
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is set to the
// case-insensitive value "opentelemetry".
//
// Do not access directly. Use instead IsOpenTelemetryTracingEnabled or
// IsOpenCensusTracingEnabled. Intended for use only in unit tests. Restore
// original value after each test.
OpenTelemetryTracingEnabled bool = strings.EqualFold(strings.TrimSpace(
os.Getenv(TelemetryPlatformTracingVar)), TelemetryPlatformTracingOpenTelemetry)
)
// IsOpenCensusTracingEnabled returns true if the environment variable
@ -55,7 +72,7 @@ func IsOpenCensusTracingEnabled() bool {
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING is set to the
// case-insensitive value "opentelemetry".
func IsOpenTelemetryTracingEnabled() bool {
return openTelemetryTracingEnabled
return OpenTelemetryTracingEnabled
}
// StartSpan adds a span to the trace with the given name. If IsOpenCensusTracingEnabled
@ -63,12 +80,12 @@ func IsOpenTelemetryTracingEnabled() bool {
// returns true, the span will be an OpenTelemetry span. Set the environment variable
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
// value "opentelemetry" before loading the package to use OpenTelemetry tracing.
// The default will remain OpenCensus until [TBD], at which time the default will
// The default will remain OpenCensus until May 29, 2024, at which time the default will
// switch to "opentelemetry" and explicitly setting the environment variable to
// "opencensus" will be required to continue using OpenCensus tracing.
func StartSpan(ctx context.Context, name string) context.Context {
if IsOpenTelemetryTracingEnabled() {
ctx, _ = otel.GetTracerProvider().Tracer(openTelemetryTracerName).Start(ctx, name)
ctx, _ = otel.GetTracerProvider().Tracer(OpenTelemetryTracerName).Start(ctx, name)
} else {
ctx, _ = trace.StartSpan(ctx, name)
}
@ -80,7 +97,7 @@ func StartSpan(ctx context.Context, name string) context.Context {
// returns true, the span will be an OpenTelemetry span. Set the environment variable
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
// value "opentelemetry" before loading the package to use OpenTelemetry tracing.
// The default will remain OpenCensus until [TBD], at which time the default will
// The default will remain OpenCensus until May 29, 2024, at which time the default will
// switch to "opentelemetry" and explicitly setting the environment variable to
// "opencensus" will be required to continue using OpenCensus tracing.
func EndSpan(ctx context.Context, err error) {
@ -166,7 +183,7 @@ func httpStatusCodeToOCCode(httpStatusCode int) int32 {
// span must be an OpenTelemetry span. Set the environment variable
// GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING to the case-insensitive
// value "opentelemetry" before loading the package to use OpenTelemetry tracing.
// The default will remain OpenCensus until [TBD], at which time the default will
// The default will remain OpenCensus until May 29, 2024, at which time the default will
// switch to "opentelemetry" and explicitly setting the environment variable to
// "opencensus" will be required to continue using OpenCensus tracing.
func TracePrintf(ctx context.Context, attrMap map[string]interface{}, format string, args ...interface{}) {

View file

@ -1,6 +1,19 @@
# Changes
## [1.36.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.35.1...storage/v1.36.0) (2023-12-14)
### Features
* **storage:** Add object retention feature ([#9072](https://github.com/googleapis/google-cloud-go/issues/9072)) ([16ecfd1](https://github.com/googleapis/google-cloud-go/commit/16ecfd150ff1982f03d207a80a82e934d1013874))
### Bug Fixes
* **storage:** Do not inhibit the dead code elimination. ([#8543](https://github.com/googleapis/google-cloud-go/issues/8543)) ([ca2493f](https://github.com/googleapis/google-cloud-go/commit/ca2493f43c299bbaed5f7e5b70f66cc763ff9802))
* **storage:** Set flush and get_state to false on the last write in gRPC ([#9013](https://github.com/googleapis/google-cloud-go/issues/9013)) ([c1e9fe5](https://github.com/googleapis/google-cloud-go/commit/c1e9fe5f4166a71e55814ccf126926ec0e0e7945))
## [1.35.1](https://github.com/googleapis/google-cloud-go/compare/storage/v1.35.0...storage/v1.35.1) (2023-11-09)

View file

@ -48,6 +48,7 @@ type BucketHandle struct {
conds *BucketConditions
userProject string // project for Requester Pays buckets
retry *retryConfig
enableObjectRetention *bool
}
// Bucket returns a BucketHandle, which provides operations on the named bucket.
@ -85,7 +86,8 @@ func (b *BucketHandle) Create(ctx context.Context, projectID string, attrs *Buck
defer func() { trace.EndSpan(ctx, err) }()
o := makeStorageOpts(true, b.retry, b.userProject)
if _, err := b.c.tc.CreateBucket(ctx, projectID, b.name, attrs, o...); err != nil {
if _, err := b.c.tc.CreateBucket(ctx, projectID, b.name, attrs, b.enableObjectRetention, o...); err != nil {
return err
}
return nil
@ -462,6 +464,15 @@ type BucketAttrs struct {
// allows for the automatic selection of the best storage class
// based on object access patterns.
Autoclass *Autoclass
// ObjectRetentionMode reports whether individual objects in the bucket can
// be configured with a retention policy. An empty value means that object
// retention is disabled.
// This field is read-only. Object retention can be enabled only by creating
// a bucket with SetObjectRetention set to true on the BucketHandle. It
// cannot be modified once the bucket is created.
// ObjectRetention cannot be configured or reported through the gRPC API.
ObjectRetentionMode string
}
// BucketPolicyOnly is an alias for UniformBucketLevelAccess.
@ -757,6 +768,7 @@ func newBucket(b *raw.Bucket) (*BucketAttrs, error) {
if err != nil {
return nil, err
}
return &BucketAttrs{
Name: b.Name,
Location: b.Location,
@ -771,6 +783,7 @@ func newBucket(b *raw.Bucket) (*BucketAttrs, error) {
RequesterPays: b.Billing != nil && b.Billing.RequesterPays,
Lifecycle: toLifecycle(b.Lifecycle),
RetentionPolicy: rp,
ObjectRetentionMode: toBucketObjectRetention(b.ObjectRetention),
CORS: toCORS(b.Cors),
Encryption: toBucketEncryption(b.Encryption),
Logging: toBucketLogging(b.Logging),
@ -1348,6 +1361,17 @@ func (b *BucketHandle) LockRetentionPolicy(ctx context.Context) error {
return b.c.tc.LockBucketRetentionPolicy(ctx, b.name, b.conds, o...)
}
// SetObjectRetention returns a new BucketHandle that will enable object retention
// on bucket creation. To enable object retention, you must use the returned
// handle to create the bucket. This has no effect on an already existing bucket.
// ObjectRetention is not enabled by default.
// ObjectRetention cannot be configured through the gRPC API.
func (b *BucketHandle) SetObjectRetention(enable bool) *BucketHandle {
b2 := *b
b2.enableObjectRetention = &enable
return &b2
}
// applyBucketConds modifies the provided call using the conditions in conds.
// call is something that quacks like a *raw.WhateverCall.
func applyBucketConds(method string, conds *BucketConditions, call interface{}) error {
@ -1360,11 +1384,11 @@ func applyBucketConds(method string, conds *BucketConditions, call interface{})
cval := reflect.ValueOf(call)
switch {
case conds.MetagenerationMatch != 0:
if !setConditionField(cval, "IfMetagenerationMatch", conds.MetagenerationMatch) {
if !setIfMetagenerationMatch(cval, conds.MetagenerationMatch) {
return fmt.Errorf("storage: %s: ifMetagenerationMatch not supported", method)
}
case conds.MetagenerationNotMatch != 0:
if !setConditionField(cval, "IfMetagenerationNotMatch", conds.MetagenerationNotMatch) {
if !setIfMetagenerationNotMatch(cval, conds.MetagenerationNotMatch) {
return fmt.Errorf("storage: %s: ifMetagenerationNotMatch not supported", method)
}
}
@ -1447,6 +1471,13 @@ func toRetentionPolicyFromProto(rp *storagepb.Bucket_RetentionPolicy) *Retention
}
}
func toBucketObjectRetention(or *raw.BucketObjectRetention) string {
if or == nil {
return ""
}
return or.Mode
}
func toRawCORS(c []CORS) []*raw.BucketCors {
var out []*raw.BucketCors
for _, v := range c {

View file

@ -44,7 +44,7 @@ type storageClient interface {
// Top-level methods.
GetServiceAccount(ctx context.Context, project string, opts ...storageOption) (string, error)
CreateBucket(ctx context.Context, project, bucket string, attrs *BucketAttrs, opts ...storageOption) (*BucketAttrs, error)
CreateBucket(ctx context.Context, project, bucket string, attrs *BucketAttrs, enableObjectRetention *bool, opts ...storageOption) (*BucketAttrs, error)
ListBuckets(ctx context.Context, project string, opts ...storageOption) *BucketIterator
Close() error
@ -60,7 +60,7 @@ type storageClient interface {
DeleteObject(ctx context.Context, bucket, object string, gen int64, conds *Conditions, opts ...storageOption) error
GetObject(ctx context.Context, bucket, object string, gen int64, encryptionKey []byte, conds *Conditions, opts ...storageOption) (*ObjectAttrs, error)
UpdateObject(ctx context.Context, bucket, object string, uattrs *ObjectAttrsToUpdate, gen int64, encryptionKey []byte, conds *Conditions, opts ...storageOption) (*ObjectAttrs, error)
UpdateObject(ctx context.Context, params *updateObjectParams, opts ...storageOption) (*ObjectAttrs, error)
// Default Object ACL methods.
@ -291,6 +291,15 @@ type newRangeReaderParams struct {
readCompressed bool // Use accept-encoding: gzip. Only works for HTTP currently.
}
type updateObjectParams struct {
bucket, object string
uattrs *ObjectAttrsToUpdate
gen int64
encryptionKey []byte
conds *Conditions
overrideRetention *bool
}
type composeObjectRequest struct {
dstBucket string
dstObject destinationObject

View file

@ -152,7 +152,12 @@ func (c *grpcStorageClient) GetServiceAccount(ctx context.Context, project strin
return resp.EmailAddress, err
}
func (c *grpcStorageClient) CreateBucket(ctx context.Context, project, bucket string, attrs *BucketAttrs, opts ...storageOption) (*BucketAttrs, error) {
func (c *grpcStorageClient) CreateBucket(ctx context.Context, project, bucket string, attrs *BucketAttrs, enableObjectRetention *bool, opts ...storageOption) (*BucketAttrs, error) {
if enableObjectRetention != nil {
// TO-DO: implement ObjectRetention once available - see b/308194853
return nil, status.Errorf(codes.Unimplemented, "storage: object retention is not supported in gRPC")
}
s := callSettings(c.settings, opts...)
b := attrs.toProtoBucket()
b.Project = toProjectResource(project)
@ -507,25 +512,30 @@ func (c *grpcStorageClient) GetObject(ctx context.Context, bucket, object string
return attrs, err
}
func (c *grpcStorageClient) UpdateObject(ctx context.Context, bucket, object string, uattrs *ObjectAttrsToUpdate, gen int64, encryptionKey []byte, conds *Conditions, opts ...storageOption) (*ObjectAttrs, error) {
func (c *grpcStorageClient) UpdateObject(ctx context.Context, params *updateObjectParams, opts ...storageOption) (*ObjectAttrs, error) {
uattrs := params.uattrs
if params.overrideRetention != nil || uattrs.Retention != nil {
// TO-DO: implement ObjectRetention once available - see b/308194853
return nil, status.Errorf(codes.Unimplemented, "storage: object retention is not supported in gRPC")
}
s := callSettings(c.settings, opts...)
o := uattrs.toProtoObject(bucketResourceName(globalProjectAlias, bucket), object)
o := uattrs.toProtoObject(bucketResourceName(globalProjectAlias, params.bucket), params.object)
// For Update, generation is passed via the object message rather than a field on the request.
if gen >= 0 {
o.Generation = gen
if params.gen >= 0 {
o.Generation = params.gen
}
req := &storagepb.UpdateObjectRequest{
Object: o,
PredefinedAcl: uattrs.PredefinedACL,
}
if err := applyCondsProto("grpcStorageClient.UpdateObject", defaultGen, conds, req); err != nil {
if err := applyCondsProto("grpcStorageClient.UpdateObject", defaultGen, params.conds, req); err != nil {
return nil, err
}
if s.userProject != "" {
ctx = setUserProjectMetadata(ctx, s.userProject)
}
if encryptionKey != nil {
req.CommonObjectRequestParams = toProtoCommonObjectRequestParams(encryptionKey)
if params.encryptionKey != nil {
req.CommonObjectRequestParams = toProtoCommonObjectRequestParams(params.encryptionKey)
}
fieldMask := &fieldmaskpb.FieldMask{Paths: nil}
@ -739,7 +749,8 @@ func (c *grpcStorageClient) DeleteObjectACL(ctx context.Context, bucket, object
}
uattrs := &ObjectAttrsToUpdate{ACL: acl}
// Call UpdateObject with the specified metageneration.
if _, err = c.UpdateObject(ctx, bucket, object, uattrs, defaultGen, nil, &Conditions{MetagenerationMatch: attrs.Metageneration}, opts...); err != nil {
params := &updateObjectParams{bucket: bucket, object: object, uattrs: uattrs, gen: defaultGen, conds: &Conditions{MetagenerationMatch: attrs.Metageneration}}
if _, err = c.UpdateObject(ctx, params, opts...); err != nil {
return err
}
return nil
@ -769,7 +780,8 @@ func (c *grpcStorageClient) UpdateObjectACL(ctx context.Context, bucket, object
acl = append(attrs.ACL, aclRule)
uattrs := &ObjectAttrsToUpdate{ACL: acl}
// Call UpdateObject with the specified metageneration.
if _, err = c.UpdateObject(ctx, bucket, object, uattrs, defaultGen, nil, &Conditions{MetagenerationMatch: attrs.Metageneration}, opts...); err != nil {
params := &updateObjectParams{bucket: bucket, object: object, uattrs: uattrs, gen: defaultGen, conds: &Conditions{MetagenerationMatch: attrs.Metageneration}}
if _, err = c.UpdateObject(ctx, params, opts...); err != nil {
return err
}
return nil
@ -1049,6 +1061,13 @@ func (c *grpcStorageClient) OpenWriter(params *openWriterParams, opts ...storage
return
}
if params.attrs.Retention != nil {
// TO-DO: remove once ObjectRetention is available - see b/308194853
err = status.Errorf(codes.Unimplemented, "storage: object retention is not supported in gRPC")
errorf(err)
pr.CloseWithError(err)
return
}
// The chunk buffer is full, but there is no end in sight. This
// means that either:
// 1. A resumable upload will need to be used to send
@ -1629,8 +1648,8 @@ func (w *gRPCWriter) uploadBuffer(recvd int, start int64, doneReading bool) (*st
},
WriteOffset: writeOffset,
FinishWrite: lastWriteOfEntireObject,
Flush: remainingDataFitsInSingleReq,
StateLookup: remainingDataFitsInSingleReq,
Flush: remainingDataFitsInSingleReq && !lastWriteOfEntireObject,
StateLookup: remainingDataFitsInSingleReq && !lastWriteOfEntireObject,
}
// Open a new stream if necessary and set the first_message field on
@ -1723,8 +1742,11 @@ func (w *gRPCWriter) uploadBuffer(recvd int, start int64, doneReading bool) (*st
return nil, writeOffset, nil
}
// Done sending data (remainingDataFitsInSingleReq should == true if we
// reach this code). Receive from the stream to confirm the persisted data.
// Done sending the data in the buffer (remainingDataFitsInSingleReq
// should == true if we reach this code).
// If we are done sending the whole object, close the stream and get the final
// object. Otherwise, receive from the stream to confirm the persisted data.
if !lastWriteOfEntireObject {
resp, err := w.stream.Recv()
// Retriable errors mean we should start over and attempt to
@ -1747,8 +1769,6 @@ func (w *gRPCWriter) uploadBuffer(recvd int, start int64, doneReading bool) (*st
return nil, 0, err
}
// Confirm the persisted data if we have not finished uploading the object.
if !lastWriteOfEntireObject {
if resp.GetPersistedSize() != writeOffset {
// Retry if not all bytes were persisted.
writeOffset = resp.GetPersistedSize()

View file

@ -159,7 +159,7 @@ func (c *httpStorageClient) GetServiceAccount(ctx context.Context, project strin
return res.EmailAddress, nil
}
func (c *httpStorageClient) CreateBucket(ctx context.Context, project, bucket string, attrs *BucketAttrs, opts ...storageOption) (*BucketAttrs, error) {
func (c *httpStorageClient) CreateBucket(ctx context.Context, project, bucket string, attrs *BucketAttrs, enableObjectRetention *bool, opts ...storageOption) (*BucketAttrs, error) {
s := callSettings(c.settings, opts...)
var bkt *raw.Bucket
if attrs != nil {
@ -181,6 +181,9 @@ func (c *httpStorageClient) CreateBucket(ctx context.Context, project, bucket st
if attrs != nil && attrs.PredefinedDefaultObjectACL != "" {
req.PredefinedDefaultObjectAcl(attrs.PredefinedDefaultObjectACL)
}
if enableObjectRetention != nil {
req.EnableObjectRetention(*enableObjectRetention)
}
var battrs *BucketAttrs
err := run(ctx, func(ctx context.Context) error {
b, err := req.Context(ctx).Do()
@ -431,7 +434,8 @@ func (c *httpStorageClient) GetObject(ctx context.Context, bucket, object string
return newObject(obj), nil
}
func (c *httpStorageClient) UpdateObject(ctx context.Context, bucket, object string, uattrs *ObjectAttrsToUpdate, gen int64, encryptionKey []byte, conds *Conditions, opts ...storageOption) (*ObjectAttrs, error) {
func (c *httpStorageClient) UpdateObject(ctx context.Context, params *updateObjectParams, opts ...storageOption) (*ObjectAttrs, error) {
uattrs := params.uattrs
s := callSettings(c.settings, opts...)
var attrs ObjectAttrs
@ -496,11 +500,21 @@ func (c *httpStorageClient) UpdateObject(ctx context.Context, bucket, object str
// we don't append to nullFields here.
forceSendFields = append(forceSendFields, "Acl")
}
rawObj := attrs.toRawObject(bucket)
if uattrs.Retention != nil {
// For ObjectRetention it's an error to send empty fields.
// Instead we send a null as the user's intention is to remove.
if uattrs.Retention.Mode == "" && uattrs.Retention.RetainUntil.IsZero() {
nullFields = append(nullFields, "Retention")
} else {
attrs.Retention = uattrs.Retention
forceSendFields = append(forceSendFields, "Retention")
}
}
rawObj := attrs.toRawObject(params.bucket)
rawObj.ForceSendFields = forceSendFields
rawObj.NullFields = nullFields
call := c.raw.Objects.Patch(bucket, object, rawObj).Projection("full")
if err := applyConds("Update", gen, conds, call); err != nil {
call := c.raw.Objects.Patch(params.bucket, params.object, rawObj).Projection("full")
if err := applyConds("Update", params.gen, params.conds, call); err != nil {
return nil, err
}
if s.userProject != "" {
@ -509,9 +523,14 @@ func (c *httpStorageClient) UpdateObject(ctx context.Context, bucket, object str
if uattrs.PredefinedACL != "" {
call.PredefinedAcl(uattrs.PredefinedACL)
}
if err := setEncryptionHeaders(call.Header(), encryptionKey, false); err != nil {
if err := setEncryptionHeaders(call.Header(), params.encryptionKey, false); err != nil {
return nil, err
}
if params.overrideRetention != nil {
call.OverrideUnlockedRetention(*params.overrideRetention)
}
var obj *raw.Object
var err error
err = run(ctx, func(ctx context.Context) error { obj, err = call.Context(ctx).Do(); return err }, s.retry, s.idempotent)

View file

@ -15,4 +15,4 @@
package internal
// Version is the current tagged release of the library.
const Version = "1.35.1"
const Version = "1.36.0"

View file

@ -889,6 +889,7 @@ type ObjectHandle struct {
userProject string // for requester-pays buckets
readCompressed bool // Accept-Encoding: gzip
retry *retryConfig
overrideRetention *bool
}
// ACL provides access to the object's access control list.
@ -958,7 +959,15 @@ func (o *ObjectHandle) Update(ctx context.Context, uattrs ObjectAttrsToUpdate) (
}
isIdempotent := o.conds != nil && o.conds.MetagenerationMatch != 0
opts := makeStorageOpts(isIdempotent, o.retry, o.userProject)
return o.c.tc.UpdateObject(ctx, o.bucket, o.object, &uattrs, o.gen, o.encryptionKey, o.conds, opts...)
return o.c.tc.UpdateObject(ctx,
&updateObjectParams{
bucket: o.bucket,
object: o.object,
uattrs: &uattrs,
gen: o.gen,
encryptionKey: o.encryptionKey,
conds: o.conds,
overrideRetention: o.overrideRetention}, opts...)
}
// BucketName returns the name of the bucket.
@ -973,16 +982,19 @@ func (o *ObjectHandle) ObjectName() string {
// ObjectAttrsToUpdate is used to update the attributes of an object.
// Only fields set to non-nil values will be updated.
// For all fields except CustomTime, set the field to its zero value to delete
// it. CustomTime cannot be deleted or changed to an earlier time once set.
// For all fields except CustomTime and Retention, set the field to its zero
// value to delete it. CustomTime cannot be deleted or changed to an earlier
// time once set. Retention can be deleted (only if the Mode is Unlocked) by
// setting it to an empty value (not nil).
//
// For example, to change ContentType and delete ContentEncoding and
// Metadata, use
// For example, to change ContentType and delete ContentEncoding, Metadata and
// Retention, use:
//
// ObjectAttrsToUpdate{
// ContentType: "text/html",
// ContentEncoding: "",
// Metadata: map[string]string{},
// Retention: &ObjectRetention{},
// }
type ObjectAttrsToUpdate struct {
EventBasedHold optional.Bool
@ -999,6 +1011,12 @@ type ObjectAttrsToUpdate struct {
// If not empty, applies a predefined set of access controls. ACL must be nil.
// See https://cloud.google.com/storage/docs/json_api/v1/objects/patch.
PredefinedACL string
// Retention contains the retention configuration for this object.
// Operations other than setting the retention for the first time or
// extending the RetainUntil time on the object retention must be done
// on an ObjectHandle with OverrideUnlockedRetention set to true.
Retention *ObjectRetention
}
// Delete deletes the single specified object.
@ -1020,6 +1038,17 @@ func (o *ObjectHandle) ReadCompressed(compressed bool) *ObjectHandle {
return &o2
}
// OverrideUnlockedRetention provides an option for overriding an Unlocked
// Retention policy. This must be set to true in order to change a policy
// from Unlocked to Locked, to set it to null, or to reduce its
// RetainUntil attribute. It is not required for setting the ObjectRetention for
// the first time nor for extending the RetainUntil time.
func (o *ObjectHandle) OverrideUnlockedRetention(override bool) *ObjectHandle {
o2 := *o
o2.overrideRetention = &override
return &o2
}
// NewWriter returns a storage Writer that writes to the GCS object
// associated with this ObjectHandle.
//
@ -1109,6 +1138,7 @@ func (o *ObjectAttrs) toRawObject(bucket string) *raw.Object {
Acl: toRawObjectACL(o.ACL),
Metadata: o.Metadata,
CustomTime: ct,
Retention: o.Retention.toRawObjectRetention(),
}
}
@ -1344,6 +1374,42 @@ type ObjectAttrs struct {
// For non-composite objects, the value will be zero.
// This field is read-only.
ComponentCount int64
// Retention contains the retention configuration for this object.
// ObjectRetention cannot be configured or reported through the gRPC API.
Retention *ObjectRetention
}
// ObjectRetention contains the retention configuration for this object.
type ObjectRetention struct {
// Mode is the retention policy's mode on this object. Valid values are
// "Locked" and "Unlocked".
// Locked retention policies cannot be changed. Unlocked policies require an
// override to change.
Mode string
// RetainUntil is the time this object will be retained until.
RetainUntil time.Time
}
func (r *ObjectRetention) toRawObjectRetention() *raw.ObjectRetention {
if r == nil {
return nil
}
return &raw.ObjectRetention{
Mode: r.Mode,
RetainUntilTime: r.RetainUntil.Format(time.RFC3339),
}
}
func toObjectRetention(r *raw.ObjectRetention) *ObjectRetention {
if r == nil {
return nil
}
return &ObjectRetention{
Mode: r.Mode,
RetainUntil: convertTime(r.RetainUntilTime),
}
}
// convertTime converts a time in RFC3339 format to time.Time.
@ -1415,6 +1481,7 @@ func newObject(o *raw.Object) *ObjectAttrs {
Etag: o.Etag,
CustomTime: convertTime(o.CustomTime),
ComponentCount: o.ComponentCount,
Retention: toObjectRetention(o.Retention),
}
}
@ -1587,6 +1654,7 @@ var attrToFieldMap = map[string]string{
"Etag": "etag",
"CustomTime": "customTime",
"ComponentCount": "componentCount",
"Retention": "retention",
}
// attrToProtoFieldMap maps the field names of ObjectAttrs to the underlying field
@ -1621,6 +1689,7 @@ var attrToProtoFieldMap = map[string]string{
"ComponentCount": "component_count",
// MediaLink was explicitly excluded from the proto as it is an HTTP-ism.
// "MediaLink": "mediaLink",
// TODO: add object retention - b/308194853
}
// SetAttrSelection makes the query populate only specific attributes of
@ -1806,7 +1875,7 @@ func (c *Conditions) isMetagenerationValid() bool {
func applyConds(method string, gen int64, conds *Conditions, call interface{}) error {
cval := reflect.ValueOf(call)
if gen >= 0 {
if !setConditionField(cval, "Generation", gen) {
if !setGeneration(cval, gen) {
return fmt.Errorf("storage: %s: generation not supported", method)
}
}
@ -1818,25 +1887,25 @@ func applyConds(method string, gen int64, conds *Conditions, call interface{}) e
}
switch {
case conds.GenerationMatch != 0:
if !setConditionField(cval, "IfGenerationMatch", conds.GenerationMatch) {
if !setIfGenerationMatch(cval, conds.GenerationMatch) {
return fmt.Errorf("storage: %s: ifGenerationMatch not supported", method)
}
case conds.GenerationNotMatch != 0:
if !setConditionField(cval, "IfGenerationNotMatch", conds.GenerationNotMatch) {
if !setIfGenerationNotMatch(cval, conds.GenerationNotMatch) {
return fmt.Errorf("storage: %s: ifGenerationNotMatch not supported", method)
}
case conds.DoesNotExist:
if !setConditionField(cval, "IfGenerationMatch", int64(0)) {
if !setIfGenerationMatch(cval, int64(0)) {
return fmt.Errorf("storage: %s: DoesNotExist not supported", method)
}
}
switch {
case conds.MetagenerationMatch != 0:
if !setConditionField(cval, "IfMetagenerationMatch", conds.MetagenerationMatch) {
if !setIfMetagenerationMatch(cval, conds.MetagenerationMatch) {
return fmt.Errorf("storage: %s: ifMetagenerationMatch not supported", method)
}
case conds.MetagenerationNotMatch != 0:
if !setConditionField(cval, "IfMetagenerationNotMatch", conds.MetagenerationNotMatch) {
if !setIfMetagenerationNotMatch(cval, conds.MetagenerationNotMatch) {
return fmt.Errorf("storage: %s: ifMetagenerationNotMatch not supported", method)
}
}
@ -1897,16 +1966,45 @@ func applySourceCondsProto(gen int64, conds *Conditions, call *storagepb.Rewrite
return nil
}
// setConditionField sets a field on a *raw.WhateverCall.
// setGeneration sets Generation on a *raw.WhateverCall.
// We can't use anonymous interfaces because the return type is
// different, since the field setters are builders.
func setConditionField(call reflect.Value, name string, value interface{}) bool {
m := call.MethodByName(name)
if !m.IsValid() {
return false
// We also make sure to supply a compile-time constant to MethodByName;
// otherwise, the Go Linker will disable dead code elimination, leading
// to larger binaries for all packages that import storage.
func setGeneration(cval reflect.Value, value interface{}) bool {
return setCondition(cval.MethodByName("Generation"), value)
}
m.Call([]reflect.Value{reflect.ValueOf(value)})
return true
// setIfGenerationMatch sets IfGenerationMatch on a *raw.WhateverCall.
// See also setGeneration.
func setIfGenerationMatch(cval reflect.Value, value interface{}) bool {
return setCondition(cval.MethodByName("IfGenerationMatch"), value)
}
// setIfGenerationNotMatch sets IfGenerationNotMatch on a *raw.WhateverCall.
// See also setGeneration.
func setIfGenerationNotMatch(cval reflect.Value, value interface{}) bool {
return setCondition(cval.MethodByName("IfGenerationNotMatch"), value)
}
// setIfMetagenerationMatch sets IfMetagenerationMatch on a *raw.WhateverCall.
// See also setGeneration.
func setIfMetagenerationMatch(cval reflect.Value, value interface{}) bool {
return setCondition(cval.MethodByName("IfMetagenerationMatch"), value)
}
// setIfMetagenerationNotMatch sets IfMetagenerationNotMatch on a *raw.WhateverCall.
// See also setGeneration.
func setIfMetagenerationNotMatch(cval reflect.Value, value interface{}) bool {
return setCondition(cval.MethodByName("IfMetagenerationNotMatch"), value)
}
func setCondition(setter reflect.Value, value interface{}) bool {
if setter.IsValid() {
setter.Call([]reflect.Value{reflect.ValueOf(value)})
}
return setter.IsValid()
}
// Retryer returns an object handle that is configured with custom retry

View file

@ -1,5 +1,24 @@
# Release History
## 1.2.1 (2023-12-13)
### Features Added
* Exposed GetSASURL from specialized clients
### Bugs Fixed
* Fixed case in Blob Batch API when blob path has / in it. Fixes [#21649](https://github.com/Azure/azure-sdk-for-go/issues/21649).
* Fixed SharedKeyMissingError when using client.BlobClient().GetSASURL() method
* Fixed an issue that would cause metadata keys with empty values to be omitted when enumerating blobs.
* Fixed an issue where passing empty map to set blob tags API was causing panic. Fixes [#21869](https://github.com/Azure/azure-sdk-for-go/issues/21869).
* Fixed an issue where downloaded file has incorrect size when not a multiple of block size. Fixes [#21995](https://github.com/Azure/azure-sdk-for-go/issues/21995).
* Fixed case where `io.ErrUnexpectedEOF` was treated as expected error in `UploadStream`. Fixes [#21837](https://github.com/Azure/azure-sdk-for-go/issues/21837).
### Other Changes
* Updated the version of `azcore` to `1.9.1` and `azidentity` to `1.4.0`.
## 1.2.0 (2023-10-11)
### Bugs Fixed

View file

@ -10,6 +10,7 @@ import (
"context"
"errors"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/sas"
"io"
"os"
"time"
@ -338,6 +339,12 @@ func (ab *Client) CopyFromURL(ctx context.Context, copySource string, o *blob.Co
return blob.CopyFromURLResponse{}, errors.New("operation will not work on this blob type. CopyFromURL works only with block blob")
}
// GetSASURL is a convenience method for generating a SAS token for the currently pointed at append blob.
// It can only be used if the credential supplied during creation was a SharedKeyCredential.
func (ab *Client) GetSASURL(permissions sas.BlobPermissions, expiry time.Time, o *blob.GetSASURLOptions) (string, error) {
return ab.BlobClient().GetSASURL(permissions, expiry, o)
}
// Concurrent Download Functions -----------------------------------------------------------------------------------------
// DownloadStream reads a range of bytes from a blob. The response also includes the blob's properties and metadata.

View file

@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "go",
"TagPrefix": "go/storage/azblob",
"Tag": "go/storage/azblob_818d8addd0"
"Tag": "go/storage/azblob_0040e8284c"
}

View file

@ -464,7 +464,7 @@ func (b *Client) downloadFile(ctx context.Context, writer io.Writer, o downloadO
buffers := shared.NewMMBPool(int(o.Concurrency), o.BlockSize)
defer buffers.Free()
aquireBuffer := func() ([]byte, error) {
acquireBuffer := func() ([]byte, error) {
select {
case b := <-buffers.Acquire():
// got a buffer
@ -489,21 +489,23 @@ func (b *Client) downloadFile(ctx context.Context, writer io.Writer, o downloadO
/*
* We have created as many channels as the number of chunks we have.
* Each downloaded block will be sent to the channel matching its
* sequece number, i.e. 0th block is sent to 0th channel, 1st block
* sequence number, i.e. 0th block is sent to 0th channel, 1st block
* to 1st channel and likewise. The blocks are then read and written
* to the file serially by below goroutine. Do note that the blocks
* blocks are still downloaded parallelly from n/w, only serailized
* are still downloaded parallelly from n/w, only serialized
* and written to file here.
*/
writerError := make(chan error)
writeSize := int64(0)
go func(ch chan error) {
for _, block := range blocks {
select {
case <-ctx.Done():
return
case block := <-block:
_, err := writer.Write(block)
buffers.Release(block)
n, err := writer.Write(block)
writeSize += int64(n)
buffers.Release(block[:cap(block)])
if err != nil {
ch <- err
return
@ -521,7 +523,7 @@ func (b *Client) downloadFile(ctx context.Context, writer io.Writer, o downloadO
NumChunks: numChunks,
Concurrency: o.Concurrency,
Operation: func(ctx context.Context, chunkStart int64, count int64) error {
buff, err := aquireBuffer()
buff, err := acquireBuffer()
if err != nil {
return err
}
@ -538,8 +540,8 @@ func (b *Client) downloadFile(ctx context.Context, writer io.Writer, o downloadO
return err
}
blockIndex := (chunkStart / o.BlockSize)
blocks[blockIndex] <- buff
blockIndex := chunkStart / o.BlockSize
blocks[blockIndex] <- buff[:count]
return nil
},
})
@ -551,7 +553,7 @@ func (b *Client) downloadFile(ctx context.Context, writer io.Writer, o downloadO
if err = <-writerError; err != nil {
return 0, err
}
return count, nil
return writeSize, nil
}
// DownloadStream reads a range of bytes from a blob. The response also includes the blob's properties and metadata.

View file

@ -51,7 +51,7 @@ type Tags = generated.BlobTag
// HTTPRange defines a range of bytes within an HTTP resource, starting at offset and
// ending at offset+count. A zero-value HTTPRange indicates the entire resource. An HTTPRange
// which has an offset but no zero value count indicates from the offset to the resource's end.
// which has an offset and zero value count indicates from the offset to the resource's end.
type HTTPRange = exported.HTTPRange
// Request Model Declaration -------------------------------------------------------------------------------------------

View file

@ -69,6 +69,7 @@ const (
CopyIDMismatch Code = "CopyIdMismatch"
EmptyMetadataKey Code = "EmptyMetadataKey"
FeatureVersionMismatch Code = "FeatureVersionMismatch"
ImmutabilityPolicyDeleteOnLockedPolicy Code = "ImmutabilityPolicyDeleteOnLockedPolicy"
IncrementalCopyBlobMismatch Code = "IncrementalCopyBlobMismatch"
IncrementalCopyOfEralierVersionSnapshotNotAllowed Code = "IncrementalCopyOfEralierVersionSnapshotNotAllowed"
IncrementalCopySourceMustBeSnapshot Code = "IncrementalCopySourceMustBeSnapshot"
@ -122,6 +123,7 @@ const (
NoAuthenticationInformation Code = "NoAuthenticationInformation"
NoPendingCopyOperation Code = "NoPendingCopyOperation"
OperationNotAllowedOnIncrementalCopyBlob Code = "OperationNotAllowedOnIncrementalCopyBlob"
OperationNotAllowedOnRootBlob Code = "OperationNotAllowedOnRootBlob"
OperationTimedOut Code = "OperationTimedOut"
OutOfRangeInput Code = "OutOfRangeInput"
OutOfRangeQueryParameterValue Code = "OutOfRangeQueryParameterValue"

View file

@ -75,7 +75,7 @@ func copyFromReader[T ~[]byte](ctx context.Context, src io.Reader, dst blockWrit
}
var n int
n, err = io.ReadFull(src, buffer)
n, err = shared.ReadAtLeast(src, buffer, len(buffer))
if n > 0 {
// some data was read, upload it
@ -108,7 +108,7 @@ func copyFromReader[T ~[]byte](ctx context.Context, src io.Reader, dst blockWrit
}
if err != nil { // The reader is done, no more outgoing buffers
if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) {
if errors.Is(err, io.EOF) {
// these are expected errors, we don't surface those
err = nil
} else {

View file

@ -13,6 +13,7 @@ import (
"errors"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/bloberror"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/sas"
"io"
"math"
"os"
@ -129,7 +130,7 @@ func (bb *Client) URL() string {
return bb.generated().Endpoint()
}
// BlobClient returns the embedded blob client for this AppendBlob client.
// BlobClient returns the embedded blob client for this BlockBlob client.
func (bb *Client) BlobClient() *blob.Client {
blobClient, _ := base.InnerClients((*base.CompositeClient[generated.BlobClient, generated.BlockBlobClient])(bb))
return (*blob.Client)(blobClient)
@ -410,6 +411,12 @@ func (bb *Client) CopyFromURL(ctx context.Context, copySource string, o *blob.Co
return bb.BlobClient().CopyFromURL(ctx, copySource, o)
}
// GetSASURL is a convenience method for generating a SAS token for the currently pointed at block blob.
// It can only be used if the credential supplied during creation was a SharedKeyCredential.
func (bb *Client) GetSASURL(permissions sas.BlobPermissions, expiry time.Time, o *blob.GetSASURLOptions) (string, error) {
return bb.BlobClient().GetSASURL(permissions, expiry, o)
}
// Concurrent Upload Functions -----------------------------------------------------------------------------------------
// uploadFromReader uploads a buffer in blocks to a block blob.

View file

@ -26,6 +26,7 @@ stages:
parameters:
ServiceDirectory: 'storage/azblob'
RunLiveTests: true
UsePipelineProxy: false
EnvVars:
AZURE_CLIENT_ID: $(AZBLOB_CLIENT_ID)
AZURE_TENANT_ID: $(AZBLOB_TENANT_ID)

View file

@ -32,5 +32,5 @@ func ParseURL(u string) (URLParts, error) {
// HTTPRange defines a range of bytes within an HTTP resource, starting at offset and
// ending at offset+count. A zero-value HTTPRange indicates the entire resource. An HTTPRange
// which has an offset but no zero value count indicates from the offset to the resource's end.
// which has an offset and zero value count indicates from the offset to the resource's end.
type HTTPRange = exported.HTTPRange

View file

@ -71,7 +71,10 @@ type CompositeClient[T, U any] struct {
}
func InnerClients[T, U any](client *CompositeClient[T, U]) (*Client[T], *U) {
return &Client[T]{inner: client.innerT}, client.innerU
return &Client[T]{
inner: client.innerT,
credential: client.sharedKey,
}, client.innerU
}
func NewAppendBlobClient(blobURL string, azClient *azcore.Client, sharedKey *exported.SharedKeyCredential) *CompositeClient[generated.BlobClient, generated.AppendBlobClient] {

View file

@ -49,7 +49,7 @@ func createBatchID() (string, error) {
// Content-Length: 0
func buildSubRequest(req *policy.Request) []byte {
var batchSubRequest strings.Builder
blobPath := req.Raw().URL.Path
blobPath := req.Raw().URL.EscapedPath()
if len(req.Raw().URL.RawQuery) > 0 {
blobPath += "?" + req.Raw().URL.RawQuery
}

View file

@ -13,7 +13,7 @@ import (
// HTTPRange defines a range of bytes within an HTTP resource, starting at offset and
// ending at offset+count. A zero-value HTTPRange indicates the entire resource. An HTTPRange
// which has an offset but no zero value count indicates from the offset to the resource's end.
// which has an offset and zero value count indicates from the offset to the resource's end.
type HTTPRange struct {
Offset int64
Count int64

View file

@ -8,5 +8,5 @@ package exported
const (
ModuleName = "azblob"
ModuleVersion = "v1.2.0"
ModuleVersion = "v1.2.1"
)

View file

@ -19,7 +19,7 @@ modelerfour:
seal-single-value-enum-by-default: true
lenient-model-deduplication: true
export-clients: true
use: "@autorest/go@4.0.0-preview.49"
use: "@autorest/go@4.0.0-preview.61"
```
### Updating service version to 2023-08-03
@ -280,7 +280,9 @@ directive:
``` yaml
directive:
- from: zz_models.go
- from:
- zz_models.go
- zz_options.go
where: $
transform: >-
return $.
@ -443,8 +445,8 @@ directive:
where: $
transform: >-
return $.
replace(/if\s+!runtime\.HasStatusCode\(resp,\s+http\.StatusOK\)\s+\{\s*\n\t\treturn\s+ServiceClientSubmitBatchResponse\{\}\,\s+runtime\.NewResponseError\(resp\)\s*\n\t\}/g,
`if !runtime.HasStatusCode(resp, http.StatusAccepted) {\n\t\treturn ServiceClientSubmitBatchResponse{}, runtime.NewResponseError(resp)\n\t}`);
replace(/if\s+!runtime\.HasStatusCode\(httpResp,\s+http\.StatusOK\)\s+\{\s+err\s+=\s+runtime\.NewResponseError\(httpResp\)\s+return ServiceClientSubmitBatchResponse\{\}\,\s+err\s+}/g,
`if !runtime.HasStatusCode(httpResp, http.StatusAccepted) {\n\t\terr = runtime.NewResponseError(httpResp)\n\t\treturn ServiceClientSubmitBatchResponse{}, err\n\t}`);
```
### Convert time to GMT for If-Modified-Since and If-Unmodified-Since request headers

View file

@ -3,9 +3,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// DO NOT EDIT.
package generated
@ -44,18 +43,21 @@ type AppendBlobClient struct {
// - CPKScopeInfo - CPKScopeInfo contains a group of parameters for the BlobClient.SetMetadata method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
func (client *AppendBlobClient) AppendBlock(ctx context.Context, contentLength int64, body io.ReadSeekCloser, options *AppendBlobClientAppendBlockOptions, leaseAccessConditions *LeaseAccessConditions, appendPositionAccessConditions *AppendPositionAccessConditions, cpkInfo *CPKInfo, cpkScopeInfo *CPKScopeInfo, modifiedAccessConditions *ModifiedAccessConditions) (AppendBlobClientAppendBlockResponse, error) {
var err error
req, err := client.appendBlockCreateRequest(ctx, contentLength, body, options, leaseAccessConditions, appendPositionAccessConditions, cpkInfo, cpkScopeInfo, modifiedAccessConditions)
if err != nil {
return AppendBlobClientAppendBlockResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return AppendBlobClientAppendBlockResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusCreated) {
return AppendBlobClientAppendBlockResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusCreated) {
err = runtime.NewResponseError(httpResp)
return AppendBlobClientAppendBlockResponse{}, err
}
return client.appendBlockHandleResponse(resp)
resp, err := client.appendBlockHandleResponse(httpResp)
return resp, err
}
// appendBlockCreateRequest creates the AppendBlock request.
@ -127,46 +129,6 @@ func (client *AppendBlobClient) appendBlockCreateRequest(ctx context.Context, co
// appendBlockHandleResponse handles the AppendBlock response.
func (client *AppendBlobClient) appendBlockHandleResponse(resp *http.Response) (AppendBlobClientAppendBlockResponse, error) {
result := AppendBlobClientAppendBlockResponse{}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return AppendBlobClientAppendBlockResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return AppendBlobClientAppendBlockResponse{}, err
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("x-ms-content-crc64"); val != "" {
contentCRC64, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return AppendBlobClientAppendBlockResponse{}, err
}
result.ContentCRC64 = contentCRC64
}
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return AppendBlobClientAppendBlockResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-blob-append-offset"); val != "" {
result.BlobAppendOffset = &val
}
@ -178,6 +140,39 @@ func (client *AppendBlobClient) appendBlockHandleResponse(resp *http.Response) (
}
result.BlobCommittedBlockCount = &blobCommittedBlockCount
}
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-content-crc64"); val != "" {
contentCRC64, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return AppendBlobClientAppendBlockResponse{}, err
}
result.ContentCRC64 = contentCRC64
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return AppendBlobClientAppendBlockResponse{}, err
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return AppendBlobClientAppendBlockResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
@ -185,11 +180,18 @@ func (client *AppendBlobClient) appendBlockHandleResponse(resp *http.Response) (
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return AppendBlobClientAppendBlockResponse{}, err
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
return result, nil
}
@ -213,18 +215,21 @@ func (client *AppendBlobClient) appendBlockHandleResponse(resp *http.Response) (
// - SourceModifiedAccessConditions - SourceModifiedAccessConditions contains a group of parameters for the BlobClient.StartCopyFromURL
// method.
func (client *AppendBlobClient) AppendBlockFromURL(ctx context.Context, sourceURL string, contentLength int64, options *AppendBlobClientAppendBlockFromURLOptions, cpkInfo *CPKInfo, cpkScopeInfo *CPKScopeInfo, leaseAccessConditions *LeaseAccessConditions, appendPositionAccessConditions *AppendPositionAccessConditions, modifiedAccessConditions *ModifiedAccessConditions, sourceModifiedAccessConditions *SourceModifiedAccessConditions) (AppendBlobClientAppendBlockFromURLResponse, error) {
var err error
req, err := client.appendBlockFromURLCreateRequest(ctx, sourceURL, contentLength, options, cpkInfo, cpkScopeInfo, leaseAccessConditions, appendPositionAccessConditions, modifiedAccessConditions, sourceModifiedAccessConditions)
if err != nil {
return AppendBlobClientAppendBlockFromURLResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return AppendBlobClientAppendBlockFromURLResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusCreated) {
return AppendBlobClientAppendBlockFromURLResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusCreated) {
err = runtime.NewResponseError(httpResp)
return AppendBlobClientAppendBlockFromURLResponse{}, err
}
return client.appendBlockFromURLHandleResponse(resp)
resp, err := client.appendBlockFromURLHandleResponse(httpResp)
return resp, err
}
// appendBlockFromURLCreateRequest creates the AppendBlockFromURL request.
@ -315,43 +320,6 @@ func (client *AppendBlobClient) appendBlockFromURLCreateRequest(ctx context.Cont
// appendBlockFromURLHandleResponse handles the AppendBlockFromURL response.
func (client *AppendBlobClient) appendBlockFromURLHandleResponse(resp *http.Response) (AppendBlobClientAppendBlockFromURLResponse, error) {
result := AppendBlobClientAppendBlockFromURLResponse{}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return AppendBlobClientAppendBlockFromURLResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return AppendBlobClientAppendBlockFromURLResponse{}, err
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("x-ms-content-crc64"); val != "" {
contentCRC64, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return AppendBlobClientAppendBlockFromURLResponse{}, err
}
result.ContentCRC64 = contentCRC64
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return AppendBlobClientAppendBlockFromURLResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-blob-append-offset"); val != "" {
result.BlobAppendOffset = &val
}
@ -363,6 +331,30 @@ func (client *AppendBlobClient) appendBlockFromURLHandleResponse(resp *http.Resp
}
result.BlobCommittedBlockCount = &blobCommittedBlockCount
}
if val := resp.Header.Get("x-ms-content-crc64"); val != "" {
contentCRC64, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return AppendBlobClientAppendBlockFromURLResponse{}, err
}
result.ContentCRC64 = contentCRC64
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return AppendBlobClientAppendBlockFromURLResponse{}, err
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return AppendBlobClientAppendBlockFromURLResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
@ -376,6 +368,19 @@ func (client *AppendBlobClient) appendBlockFromURLHandleResponse(resp *http.Resp
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return AppendBlobClientAppendBlockFromURLResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
return result, nil
}
@ -391,18 +396,21 @@ func (client *AppendBlobClient) appendBlockFromURLHandleResponse(resp *http.Resp
// - CPKScopeInfo - CPKScopeInfo contains a group of parameters for the BlobClient.SetMetadata method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
func (client *AppendBlobClient) Create(ctx context.Context, contentLength int64, options *AppendBlobClientCreateOptions, blobHTTPHeaders *BlobHTTPHeaders, leaseAccessConditions *LeaseAccessConditions, cpkInfo *CPKInfo, cpkScopeInfo *CPKScopeInfo, modifiedAccessConditions *ModifiedAccessConditions) (AppendBlobClientCreateResponse, error) {
var err error
req, err := client.createCreateRequest(ctx, contentLength, options, blobHTTPHeaders, leaseAccessConditions, cpkInfo, cpkScopeInfo, modifiedAccessConditions)
if err != nil {
return AppendBlobClientCreateResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return AppendBlobClientCreateResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusCreated) {
return AppendBlobClientCreateResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusCreated) {
err = runtime.NewResponseError(httpResp)
return AppendBlobClientCreateResponse{}, err
}
return client.createHandleResponse(resp)
resp, err := client.createHandleResponse(httpResp)
return resp, err
}
// createCreateRequest creates the Create request.
@ -496,15 +504,8 @@ func (client *AppendBlobClient) createCreateRequest(ctx context.Context, content
// createHandleResponse handles the Create response.
func (client *AppendBlobClient) createHandleResponse(resp *http.Response) (AppendBlobClientCreateResponse, error) {
result := AppendBlobClientCreateResponse{}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return AppendBlobClientCreateResponse{}, err
}
result.LastModified = &lastModified
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
@ -513,8 +514,35 @@ func (client *AppendBlobClient) createHandleResponse(resp *http.Response) (Appen
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return AppendBlobClientCreateResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
return AppendBlobClientCreateResponse{}, err
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return AppendBlobClientCreateResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
@ -525,26 +553,6 @@ func (client *AppendBlobClient) createHandleResponse(resp *http.Response) (Appen
if val := resp.Header.Get("x-ms-version-id"); val != "" {
result.VersionID = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return AppendBlobClientCreateResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
return AppendBlobClientCreateResponse{}, err
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
return result, nil
}
@ -559,18 +567,21 @@ func (client *AppendBlobClient) createHandleResponse(resp *http.Response) (Appen
// - AppendPositionAccessConditions - AppendPositionAccessConditions contains a group of parameters for the AppendBlobClient.AppendBlock
// method.
func (client *AppendBlobClient) Seal(ctx context.Context, options *AppendBlobClientSealOptions, leaseAccessConditions *LeaseAccessConditions, modifiedAccessConditions *ModifiedAccessConditions, appendPositionAccessConditions *AppendPositionAccessConditions) (AppendBlobClientSealResponse, error) {
var err error
req, err := client.sealCreateRequest(ctx, options, leaseAccessConditions, modifiedAccessConditions, appendPositionAccessConditions)
if err != nil {
return AppendBlobClientSealResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return AppendBlobClientSealResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusOK) {
return AppendBlobClientSealResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return AppendBlobClientSealResponse{}, err
}
return client.sealHandleResponse(resp)
resp, err := client.sealHandleResponse(httpResp)
return resp, err
}
// sealCreateRequest creates the Seal request.
@ -614,25 +625,9 @@ func (client *AppendBlobClient) sealCreateRequest(ctx context.Context, options *
// sealHandleResponse handles the Seal response.
func (client *AppendBlobClient) sealHandleResponse(resp *http.Response) (AppendBlobClientSealResponse, error) {
result := AppendBlobClientSealResponse{}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return AppendBlobClientSealResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
@ -640,6 +635,9 @@ func (client *AppendBlobClient) sealHandleResponse(resp *http.Response) (AppendB
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("x-ms-blob-sealed"); val != "" {
isSealed, err := strconv.ParseBool(val)
if err != nil {
@ -647,5 +645,18 @@ func (client *AppendBlobClient) sealHandleResponse(resp *http.Response) (AppendB
}
result.IsSealed = &isSealed
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return AppendBlobClientSealResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
return result, nil
}

View file

@ -3,9 +3,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// DO NOT EDIT.
package generated
@ -47,18 +46,21 @@ type BlockBlobClient struct {
// - CPKScopeInfo - CPKScopeInfo contains a group of parameters for the BlobClient.SetMetadata method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
func (client *BlockBlobClient) CommitBlockList(ctx context.Context, blocks BlockLookupList, options *BlockBlobClientCommitBlockListOptions, blobHTTPHeaders *BlobHTTPHeaders, leaseAccessConditions *LeaseAccessConditions, cpkInfo *CPKInfo, cpkScopeInfo *CPKScopeInfo, modifiedAccessConditions *ModifiedAccessConditions) (BlockBlobClientCommitBlockListResponse, error) {
var err error
req, err := client.commitBlockListCreateRequest(ctx, blocks, options, blobHTTPHeaders, leaseAccessConditions, cpkInfo, cpkScopeInfo, modifiedAccessConditions)
if err != nil {
return BlockBlobClientCommitBlockListResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return BlockBlobClientCommitBlockListResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusCreated) {
return BlockBlobClientCommitBlockListResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusCreated) {
err = runtime.NewResponseError(httpResp)
return BlockBlobClientCommitBlockListResponse{}, err
}
return client.commitBlockListHandleResponse(resp)
resp, err := client.commitBlockListHandleResponse(httpResp)
return resp, err
}
// commitBlockListCreateRequest creates the CommitBlockList request.
@ -163,22 +165,8 @@ func (client *BlockBlobClient) commitBlockListCreateRequest(ctx context.Context,
// commitBlockListHandleResponse handles the CommitBlockList response.
func (client *BlockBlobClient) commitBlockListHandleResponse(resp *http.Response) (BlockBlobClientCommitBlockListResponse, error) {
result := BlockBlobClientCommitBlockListResponse{}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientCommitBlockListResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return BlockBlobClientCommitBlockListResponse{}, err
}
result.ContentMD5 = contentMD5
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-content-crc64"); val != "" {
contentCRC64, err := base64.StdEncoding.DecodeString(val)
@ -187,8 +175,42 @@ func (client *BlockBlobClient) commitBlockListHandleResponse(resp *http.Response
}
result.ContentCRC64 = contentCRC64
}
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return BlockBlobClientCommitBlockListResponse{}, err
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientCommitBlockListResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
return BlockBlobClientCommitBlockListResponse{}, err
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientCommitBlockListResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
@ -199,26 +221,6 @@ func (client *BlockBlobClient) commitBlockListHandleResponse(resp *http.Response
if val := resp.Header.Get("x-ms-version-id"); val != "" {
result.VersionID = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientCommitBlockListResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
return BlockBlobClientCommitBlockListResponse{}, err
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
return result, nil
}
@ -231,18 +233,21 @@ func (client *BlockBlobClient) commitBlockListHandleResponse(resp *http.Response
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
func (client *BlockBlobClient) GetBlockList(ctx context.Context, listType BlockListType, options *BlockBlobClientGetBlockListOptions, leaseAccessConditions *LeaseAccessConditions, modifiedAccessConditions *ModifiedAccessConditions) (BlockBlobClientGetBlockListResponse, error) {
var err error
req, err := client.getBlockListCreateRequest(ctx, listType, options, leaseAccessConditions, modifiedAccessConditions)
if err != nil {
return BlockBlobClientGetBlockListResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return BlockBlobClientGetBlockListResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusOK) {
return BlockBlobClientGetBlockListResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return BlockBlobClientGetBlockListResponse{}, err
}
return client.getBlockListHandleResponse(resp)
resp, err := client.getBlockListHandleResponse(httpResp)
return resp, err
}
// getBlockListCreateRequest creates the GetBlockList request.
@ -278,19 +283,6 @@ func (client *BlockBlobClient) getBlockListCreateRequest(ctx context.Context, li
// getBlockListHandleResponse handles the GetBlockList response.
func (client *BlockBlobClient) getBlockListHandleResponse(resp *http.Response) (BlockBlobClientGetBlockListResponse, error) {
result := BlockBlobClientGetBlockListResponse{}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientGetBlockListResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Content-Type"); val != "" {
result.ContentType = &val
}
if val := resp.Header.Get("x-ms-blob-content-length"); val != "" {
blobContentLength, err := strconv.ParseInt(val, 10, 64)
if err != nil {
@ -301,11 +293,8 @@ func (client *BlockBlobClient) getBlockListHandleResponse(resp *http.Response) (
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
if val := resp.Header.Get("Content-Type"); val != "" {
result.ContentType = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
@ -314,6 +303,22 @@ func (client *BlockBlobClient) getBlockListHandleResponse(resp *http.Response) (
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientGetBlockListResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if err := runtime.UnmarshalAsXML(resp, &result.BlockList); err != nil {
return BlockBlobClientGetBlockListResponse{}, err
}
@ -342,18 +347,21 @@ func (client *BlockBlobClient) getBlockListHandleResponse(resp *http.Response) (
// - SourceModifiedAccessConditions - SourceModifiedAccessConditions contains a group of parameters for the BlobClient.StartCopyFromURL
// method.
func (client *BlockBlobClient) PutBlobFromURL(ctx context.Context, contentLength int64, copySource string, options *BlockBlobClientPutBlobFromURLOptions, blobHTTPHeaders *BlobHTTPHeaders, leaseAccessConditions *LeaseAccessConditions, cpkInfo *CPKInfo, cpkScopeInfo *CPKScopeInfo, modifiedAccessConditions *ModifiedAccessConditions, sourceModifiedAccessConditions *SourceModifiedAccessConditions) (BlockBlobClientPutBlobFromURLResponse, error) {
var err error
req, err := client.putBlobFromURLCreateRequest(ctx, contentLength, copySource, options, blobHTTPHeaders, leaseAccessConditions, cpkInfo, cpkScopeInfo, modifiedAccessConditions, sourceModifiedAccessConditions)
if err != nil {
return BlockBlobClientPutBlobFromURLResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return BlockBlobClientPutBlobFromURLResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusCreated) {
return BlockBlobClientPutBlobFromURLResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusCreated) {
err = runtime.NewResponseError(httpResp)
return BlockBlobClientPutBlobFromURLResponse{}, err
}
return client.putBlobFromURLHandleResponse(resp)
resp, err := client.putBlobFromURLHandleResponse(httpResp)
return resp, err
}
// putBlobFromURLCreateRequest creates the PutBlobFromURL request.
@ -472,15 +480,8 @@ func (client *BlockBlobClient) putBlobFromURLCreateRequest(ctx context.Context,
// putBlobFromURLHandleResponse handles the PutBlobFromURL response.
func (client *BlockBlobClient) putBlobFromURLHandleResponse(resp *http.Response) (BlockBlobClientPutBlobFromURLResponse, error) {
result := BlockBlobClientPutBlobFromURLResponse{}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientPutBlobFromURLResponse{}, err
}
result.LastModified = &lastModified
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
@ -489,8 +490,35 @@ func (client *BlockBlobClient) putBlobFromURLHandleResponse(resp *http.Response)
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientPutBlobFromURLResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
return BlockBlobClientPutBlobFromURLResponse{}, err
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientPutBlobFromURLResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
@ -501,26 +529,6 @@ func (client *BlockBlobClient) putBlobFromURLHandleResponse(resp *http.Response)
if val := resp.Header.Get("x-ms-version-id"); val != "" {
result.VersionID = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientPutBlobFromURLResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
return BlockBlobClientPutBlobFromURLResponse{}, err
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
return result, nil
}
@ -538,18 +546,21 @@ func (client *BlockBlobClient) putBlobFromURLHandleResponse(resp *http.Response)
// - CPKInfo - CPKInfo contains a group of parameters for the BlobClient.Download method.
// - CPKScopeInfo - CPKScopeInfo contains a group of parameters for the BlobClient.SetMetadata method.
func (client *BlockBlobClient) StageBlock(ctx context.Context, blockID string, contentLength int64, body io.ReadSeekCloser, options *BlockBlobClientStageBlockOptions, leaseAccessConditions *LeaseAccessConditions, cpkInfo *CPKInfo, cpkScopeInfo *CPKScopeInfo) (BlockBlobClientStageBlockResponse, error) {
var err error
req, err := client.stageBlockCreateRequest(ctx, blockID, contentLength, body, options, leaseAccessConditions, cpkInfo, cpkScopeInfo)
if err != nil {
return BlockBlobClientStageBlockResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return BlockBlobClientStageBlockResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusCreated) {
return BlockBlobClientStageBlockResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusCreated) {
err = runtime.NewResponseError(httpResp)
return BlockBlobClientStageBlockResponse{}, err
}
return client.stageBlockHandleResponse(resp)
resp, err := client.stageBlockHandleResponse(httpResp)
return resp, err
}
// stageBlockCreateRequest creates the StageBlock request.
@ -601,29 +612,9 @@ func (client *BlockBlobClient) stageBlockCreateRequest(ctx context.Context, bloc
// stageBlockHandleResponse handles the StageBlock response.
func (client *BlockBlobClient) stageBlockHandleResponse(resp *http.Response) (BlockBlobClientStageBlockResponse, error) {
result := BlockBlobClientStageBlockResponse{}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return BlockBlobClientStageBlockResponse{}, err
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientStageBlockResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-content-crc64"); val != "" {
contentCRC64, err := base64.StdEncoding.DecodeString(val)
if err != nil {
@ -631,6 +622,26 @@ func (client *BlockBlobClient) stageBlockHandleResponse(resp *http.Response) (Bl
}
result.ContentCRC64 = contentCRC64
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return BlockBlobClientStageBlockResponse{}, err
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientStageBlockResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
@ -638,11 +649,11 @@ func (client *BlockBlobClient) stageBlockHandleResponse(resp *http.Response) (Bl
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
return result, nil
}
@ -665,18 +676,21 @@ func (client *BlockBlobClient) stageBlockHandleResponse(resp *http.Response) (Bl
// - SourceModifiedAccessConditions - SourceModifiedAccessConditions contains a group of parameters for the BlobClient.StartCopyFromURL
// method.
func (client *BlockBlobClient) StageBlockFromURL(ctx context.Context, blockID string, contentLength int64, sourceURL string, options *BlockBlobClientStageBlockFromURLOptions, cpkInfo *CPKInfo, cpkScopeInfo *CPKScopeInfo, leaseAccessConditions *LeaseAccessConditions, sourceModifiedAccessConditions *SourceModifiedAccessConditions) (BlockBlobClientStageBlockFromURLResponse, error) {
var err error
req, err := client.stageBlockFromURLCreateRequest(ctx, blockID, contentLength, sourceURL, options, cpkInfo, cpkScopeInfo, leaseAccessConditions, sourceModifiedAccessConditions)
if err != nil {
return BlockBlobClientStageBlockFromURLResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return BlockBlobClientStageBlockFromURLResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusCreated) {
return BlockBlobClientStageBlockFromURLResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusCreated) {
err = runtime.NewResponseError(httpResp)
return BlockBlobClientStageBlockFromURLResponse{}, err
}
return client.stageBlockFromURLHandleResponse(resp)
resp, err := client.stageBlockFromURLHandleResponse(httpResp)
return resp, err
}
// stageBlockFromURLCreateRequest creates the StageBlockFromURL request.
@ -744,12 +758,8 @@ func (client *BlockBlobClient) stageBlockFromURLCreateRequest(ctx context.Contex
// stageBlockFromURLHandleResponse handles the StageBlockFromURL response.
func (client *BlockBlobClient) stageBlockFromURLHandleResponse(resp *http.Response) (BlockBlobClientStageBlockFromURLResponse, error) {
result := BlockBlobClientStageBlockFromURLResponse{}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return BlockBlobClientStageBlockFromURLResponse{}, err
}
result.ContentMD5 = contentMD5
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-content-crc64"); val != "" {
contentCRC64, err := base64.StdEncoding.DecodeString(val)
@ -758,14 +768,12 @@ func (client *BlockBlobClient) stageBlockFromURLHandleResponse(resp *http.Respon
}
result.ContentCRC64 = contentCRC64
}
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return BlockBlobClientStageBlockFromURLResponse{}, err
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
@ -774,6 +782,12 @@ func (client *BlockBlobClient) stageBlockFromURLHandleResponse(resp *http.Respon
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
@ -781,11 +795,11 @@ func (client *BlockBlobClient) stageBlockFromURLHandleResponse(resp *http.Respon
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
return result, nil
}
@ -806,18 +820,21 @@ func (client *BlockBlobClient) stageBlockFromURLHandleResponse(resp *http.Respon
// - CPKScopeInfo - CPKScopeInfo contains a group of parameters for the BlobClient.SetMetadata method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
func (client *BlockBlobClient) Upload(ctx context.Context, contentLength int64, body io.ReadSeekCloser, options *BlockBlobClientUploadOptions, blobHTTPHeaders *BlobHTTPHeaders, leaseAccessConditions *LeaseAccessConditions, cpkInfo *CPKInfo, cpkScopeInfo *CPKScopeInfo, modifiedAccessConditions *ModifiedAccessConditions) (BlockBlobClientUploadResponse, error) {
var err error
req, err := client.uploadCreateRequest(ctx, contentLength, body, options, blobHTTPHeaders, leaseAccessConditions, cpkInfo, cpkScopeInfo, modifiedAccessConditions)
if err != nil {
return BlockBlobClientUploadResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return BlockBlobClientUploadResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusCreated) {
return BlockBlobClientUploadResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusCreated) {
err = runtime.NewResponseError(httpResp)
return BlockBlobClientUploadResponse{}, err
}
return client.uploadHandleResponse(resp)
resp, err := client.uploadHandleResponse(httpResp)
return resp, err
}
// uploadCreateRequest creates the Upload request.
@ -923,15 +940,8 @@ func (client *BlockBlobClient) uploadCreateRequest(ctx context.Context, contentL
// uploadHandleResponse handles the Upload response.
func (client *BlockBlobClient) uploadHandleResponse(resp *http.Response) (BlockBlobClientUploadResponse, error) {
result := BlockBlobClientUploadResponse{}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientUploadResponse{}, err
}
result.LastModified = &lastModified
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
@ -940,8 +950,35 @@ func (client *BlockBlobClient) uploadHandleResponse(resp *http.Response) (BlockB
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientUploadResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
return BlockBlobClientUploadResponse{}, err
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientUploadResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
@ -952,25 +989,5 @@ func (client *BlockBlobClient) uploadHandleResponse(resp *http.Response) (BlockB
if val := resp.Header.Get("x-ms-version-id"); val != "" {
result.VersionID = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return BlockBlobClientUploadResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
return BlockBlobClientUploadResponse{}, err
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
return result, nil
}

View file

@ -3,9 +3,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// DO NOT EDIT.
package generated

File diff suppressed because it is too large Load diff

View file

@ -3,9 +3,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// DO NOT EDIT.
package generated
@ -24,12 +23,12 @@ func (a AccessPolicy) MarshalXML(enc *xml.Encoder, start xml.StartElement) error
type alias AccessPolicy
aux := &struct {
*alias
Expiry *timeRFC3339 `xml:"Expiry"`
Start *timeRFC3339 `xml:"Start"`
Expiry *dateTimeRFC3339 `xml:"Expiry"`
Start *dateTimeRFC3339 `xml:"Start"`
}{
alias: (*alias)(&a),
Expiry: (*timeRFC3339)(a.Expiry),
Start: (*timeRFC3339)(a.Start),
Expiry: (*dateTimeRFC3339)(a.Expiry),
Start: (*dateTimeRFC3339)(a.Start),
}
return enc.EncodeElement(aux, start)
}
@ -39,8 +38,8 @@ func (a *AccessPolicy) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) er
type alias AccessPolicy
aux := &struct {
*alias
Expiry *timeRFC3339 `xml:"Expiry"`
Start *timeRFC3339 `xml:"Start"`
Expiry *dateTimeRFC3339 `xml:"Expiry"`
Start *dateTimeRFC3339 `xml:"Start"`
}{
alias: (*alias)(a),
}
@ -106,25 +105,25 @@ func (b BlobProperties) MarshalXML(enc *xml.Encoder, start xml.StartElement) err
type alias BlobProperties
aux := &struct {
*alias
AccessTierChangeTime *timeRFC1123 `xml:"AccessTierChangeTime"`
AccessTierChangeTime *dateTimeRFC1123 `xml:"AccessTierChangeTime"`
ContentMD5 *string `xml:"Content-MD5"`
CopyCompletionTime *timeRFC1123 `xml:"CopyCompletionTime"`
CreationTime *timeRFC1123 `xml:"Creation-Time"`
DeletedTime *timeRFC1123 `xml:"DeletedTime"`
ExpiresOn *timeRFC1123 `xml:"Expiry-Time"`
ImmutabilityPolicyExpiresOn *timeRFC1123 `xml:"ImmutabilityPolicyUntilDate"`
LastAccessedOn *timeRFC1123 `xml:"LastAccessTime"`
LastModified *timeRFC1123 `xml:"Last-Modified"`
CopyCompletionTime *dateTimeRFC1123 `xml:"CopyCompletionTime"`
CreationTime *dateTimeRFC1123 `xml:"Creation-Time"`
DeletedTime *dateTimeRFC1123 `xml:"DeletedTime"`
ExpiresOn *dateTimeRFC1123 `xml:"Expiry-Time"`
ImmutabilityPolicyExpiresOn *dateTimeRFC1123 `xml:"ImmutabilityPolicyUntilDate"`
LastAccessedOn *dateTimeRFC1123 `xml:"LastAccessTime"`
LastModified *dateTimeRFC1123 `xml:"Last-Modified"`
}{
alias: (*alias)(&b),
AccessTierChangeTime: (*timeRFC1123)(b.AccessTierChangeTime),
CopyCompletionTime: (*timeRFC1123)(b.CopyCompletionTime),
CreationTime: (*timeRFC1123)(b.CreationTime),
DeletedTime: (*timeRFC1123)(b.DeletedTime),
ExpiresOn: (*timeRFC1123)(b.ExpiresOn),
ImmutabilityPolicyExpiresOn: (*timeRFC1123)(b.ImmutabilityPolicyExpiresOn),
LastAccessedOn: (*timeRFC1123)(b.LastAccessedOn),
LastModified: (*timeRFC1123)(b.LastModified),
AccessTierChangeTime: (*dateTimeRFC1123)(b.AccessTierChangeTime),
CopyCompletionTime: (*dateTimeRFC1123)(b.CopyCompletionTime),
CreationTime: (*dateTimeRFC1123)(b.CreationTime),
DeletedTime: (*dateTimeRFC1123)(b.DeletedTime),
ExpiresOn: (*dateTimeRFC1123)(b.ExpiresOn),
ImmutabilityPolicyExpiresOn: (*dateTimeRFC1123)(b.ImmutabilityPolicyExpiresOn),
LastAccessedOn: (*dateTimeRFC1123)(b.LastAccessedOn),
LastModified: (*dateTimeRFC1123)(b.LastModified),
}
if b.ContentMD5 != nil {
encodedContentMD5 := runtime.EncodeByteArray(b.ContentMD5, runtime.Base64StdFormat)
@ -138,15 +137,15 @@ func (b *BlobProperties) UnmarshalXML(dec *xml.Decoder, start xml.StartElement)
type alias BlobProperties
aux := &struct {
*alias
AccessTierChangeTime *timeRFC1123 `xml:"AccessTierChangeTime"`
AccessTierChangeTime *dateTimeRFC1123 `xml:"AccessTierChangeTime"`
ContentMD5 *string `xml:"Content-MD5"`
CopyCompletionTime *timeRFC1123 `xml:"CopyCompletionTime"`
CreationTime *timeRFC1123 `xml:"Creation-Time"`
DeletedTime *timeRFC1123 `xml:"DeletedTime"`
ExpiresOn *timeRFC1123 `xml:"Expiry-Time"`
ImmutabilityPolicyExpiresOn *timeRFC1123 `xml:"ImmutabilityPolicyUntilDate"`
LastAccessedOn *timeRFC1123 `xml:"LastAccessTime"`
LastModified *timeRFC1123 `xml:"Last-Modified"`
CopyCompletionTime *dateTimeRFC1123 `xml:"CopyCompletionTime"`
CreationTime *dateTimeRFC1123 `xml:"Creation-Time"`
DeletedTime *dateTimeRFC1123 `xml:"DeletedTime"`
ExpiresOn *dateTimeRFC1123 `xml:"Expiry-Time"`
ImmutabilityPolicyExpiresOn *dateTimeRFC1123 `xml:"ImmutabilityPolicyUntilDate"`
LastAccessedOn *dateTimeRFC1123 `xml:"LastAccessTime"`
LastModified *dateTimeRFC1123 `xml:"Last-Modified"`
}{
alias: (*alias)(b),
}
@ -249,12 +248,12 @@ func (c ContainerProperties) MarshalXML(enc *xml.Encoder, start xml.StartElement
type alias ContainerProperties
aux := &struct {
*alias
DeletedTime *timeRFC1123 `xml:"DeletedTime"`
LastModified *timeRFC1123 `xml:"Last-Modified"`
DeletedTime *dateTimeRFC1123 `xml:"DeletedTime"`
LastModified *dateTimeRFC1123 `xml:"Last-Modified"`
}{
alias: (*alias)(&c),
DeletedTime: (*timeRFC1123)(c.DeletedTime),
LastModified: (*timeRFC1123)(c.LastModified),
DeletedTime: (*dateTimeRFC1123)(c.DeletedTime),
LastModified: (*dateTimeRFC1123)(c.LastModified),
}
return enc.EncodeElement(aux, start)
}
@ -264,8 +263,8 @@ func (c *ContainerProperties) UnmarshalXML(dec *xml.Decoder, start xml.StartElem
type alias ContainerProperties
aux := &struct {
*alias
DeletedTime *timeRFC1123 `xml:"DeletedTime"`
LastModified *timeRFC1123 `xml:"Last-Modified"`
DeletedTime *dateTimeRFC1123 `xml:"DeletedTime"`
LastModified *dateTimeRFC1123 `xml:"Last-Modified"`
}{
alias: (*alias)(c),
}
@ -297,10 +296,10 @@ func (g GeoReplication) MarshalXML(enc *xml.Encoder, start xml.StartElement) err
type alias GeoReplication
aux := &struct {
*alias
LastSyncTime *timeRFC1123 `xml:"LastSyncTime"`
LastSyncTime *dateTimeRFC1123 `xml:"LastSyncTime"`
}{
alias: (*alias)(&g),
LastSyncTime: (*timeRFC1123)(g.LastSyncTime),
LastSyncTime: (*dateTimeRFC1123)(g.LastSyncTime),
}
return enc.EncodeElement(aux, start)
}
@ -310,7 +309,7 @@ func (g *GeoReplication) UnmarshalXML(dec *xml.Decoder, start xml.StartElement)
type alias GeoReplication
aux := &struct {
*alias
LastSyncTime *timeRFC1123 `xml:"LastSyncTime"`
LastSyncTime *dateTimeRFC1123 `xml:"LastSyncTime"`
}{
alias: (*alias)(g),
}
@ -414,12 +413,12 @@ func (u UserDelegationKey) MarshalXML(enc *xml.Encoder, start xml.StartElement)
type alias UserDelegationKey
aux := &struct {
*alias
SignedExpiry *timeRFC3339 `xml:"SignedExpiry"`
SignedStart *timeRFC3339 `xml:"SignedStart"`
SignedExpiry *dateTimeRFC3339 `xml:"SignedExpiry"`
SignedStart *dateTimeRFC3339 `xml:"SignedStart"`
}{
alias: (*alias)(&u),
SignedExpiry: (*timeRFC3339)(u.SignedExpiry),
SignedStart: (*timeRFC3339)(u.SignedStart),
SignedExpiry: (*dateTimeRFC3339)(u.SignedExpiry),
SignedStart: (*dateTimeRFC3339)(u.SignedStart),
}
return enc.EncodeElement(aux, start)
}
@ -429,8 +428,8 @@ func (u *UserDelegationKey) UnmarshalXML(dec *xml.Decoder, start xml.StartElemen
type alias UserDelegationKey
aux := &struct {
*alias
SignedExpiry *timeRFC3339 `xml:"SignedExpiry"`
SignedStart *timeRFC3339 `xml:"SignedStart"`
SignedExpiry *dateTimeRFC3339 `xml:"SignedExpiry"`
SignedStart *dateTimeRFC3339 `xml:"SignedStart"`
}{
alias: (*alias)(u),
}

File diff suppressed because it is too large Load diff

View file

@ -3,9 +3,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// DO NOT EDIT.
package generated
@ -41,18 +40,21 @@ type PageBlobClient struct {
// method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
func (client *PageBlobClient) ClearPages(ctx context.Context, contentLength int64, options *PageBlobClientClearPagesOptions, leaseAccessConditions *LeaseAccessConditions, cpkInfo *CPKInfo, cpkScopeInfo *CPKScopeInfo, sequenceNumberAccessConditions *SequenceNumberAccessConditions, modifiedAccessConditions *ModifiedAccessConditions) (PageBlobClientClearPagesResponse, error) {
var err error
req, err := client.clearPagesCreateRequest(ctx, contentLength, options, leaseAccessConditions, cpkInfo, cpkScopeInfo, sequenceNumberAccessConditions, modifiedAccessConditions)
if err != nil {
return PageBlobClientClearPagesResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return PageBlobClientClearPagesResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusCreated) {
return PageBlobClientClearPagesResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusCreated) {
err = runtime.NewResponseError(httpResp)
return PageBlobClientClearPagesResponse{}, err
}
return client.clearPagesHandleResponse(resp)
resp, err := client.clearPagesHandleResponse(httpResp)
return resp, err
}
// clearPagesCreateRequest creates the ClearPages request.
@ -122,30 +124,6 @@ func (client *PageBlobClient) clearPagesCreateRequest(ctx context.Context, conte
// clearPagesHandleResponse handles the ClearPages response.
func (client *PageBlobClient) clearPagesHandleResponse(resp *http.Response) (PageBlobClientClearPagesResponse, error) {
result := PageBlobClientClearPagesResponse{}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientClearPagesResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return PageBlobClientClearPagesResponse{}, err
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("x-ms-content-crc64"); val != "" {
contentCRC64, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return PageBlobClientClearPagesResponse{}, err
}
result.ContentCRC64 = contentCRC64
}
if val := resp.Header.Get("x-ms-blob-sequence-number"); val != "" {
blobSequenceNumber, err := strconv.ParseInt(val, 10, 64)
if err != nil {
@ -156,11 +134,19 @@ func (client *PageBlobClient) clearPagesHandleResponse(resp *http.Response) (Pag
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
if val := resp.Header.Get("x-ms-content-crc64"); val != "" {
contentCRC64, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return PageBlobClientClearPagesResponse{}, err
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
result.ContentCRC64 = contentCRC64
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return PageBlobClientClearPagesResponse{}, err
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
@ -169,6 +155,22 @@ func (client *PageBlobClient) clearPagesHandleResponse(resp *http.Response) (Pag
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientClearPagesResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
return result, nil
}
@ -187,18 +189,21 @@ func (client *PageBlobClient) clearPagesHandleResponse(resp *http.Response) (Pag
// method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
func (client *PageBlobClient) CopyIncremental(ctx context.Context, copySource string, options *PageBlobClientCopyIncrementalOptions, modifiedAccessConditions *ModifiedAccessConditions) (PageBlobClientCopyIncrementalResponse, error) {
var err error
req, err := client.copyIncrementalCreateRequest(ctx, copySource, options, modifiedAccessConditions)
if err != nil {
return PageBlobClientCopyIncrementalResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return PageBlobClientCopyIncrementalResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusAccepted) {
return PageBlobClientCopyIncrementalResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusAccepted) {
err = runtime.NewResponseError(httpResp)
return PageBlobClientCopyIncrementalResponse{}, err
}
return client.copyIncrementalHandleResponse(resp)
resp, err := client.copyIncrementalHandleResponse(httpResp)
return resp, err
}
// copyIncrementalCreateRequest creates the CopyIncremental request.
@ -240,6 +245,22 @@ func (client *PageBlobClient) copyIncrementalCreateRequest(ctx context.Context,
// copyIncrementalHandleResponse handles the CopyIncremental response.
func (client *PageBlobClient) copyIncrementalHandleResponse(resp *http.Response) (PageBlobClientCopyIncrementalResponse, error) {
result := PageBlobClientCopyIncrementalResponse{}
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-copy-id"); val != "" {
result.CopyID = &val
}
if val := resp.Header.Get("x-ms-copy-status"); val != "" {
result.CopyStatus = (*CopyStatusType)(&val)
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientCopyIncrementalResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
@ -250,28 +271,12 @@ func (client *PageBlobClient) copyIncrementalHandleResponse(resp *http.Response)
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientCopyIncrementalResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-copy-id"); val != "" {
result.CopyID = &val
}
if val := resp.Header.Get("x-ms-copy-status"); val != "" {
result.CopyStatus = (*CopyStatusType)(&val)
}
return result, nil
}
@ -289,18 +294,21 @@ func (client *PageBlobClient) copyIncrementalHandleResponse(resp *http.Response)
// - CPKScopeInfo - CPKScopeInfo contains a group of parameters for the BlobClient.SetMetadata method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
func (client *PageBlobClient) Create(ctx context.Context, contentLength int64, blobContentLength int64, options *PageBlobClientCreateOptions, blobHTTPHeaders *BlobHTTPHeaders, leaseAccessConditions *LeaseAccessConditions, cpkInfo *CPKInfo, cpkScopeInfo *CPKScopeInfo, modifiedAccessConditions *ModifiedAccessConditions) (PageBlobClientCreateResponse, error) {
var err error
req, err := client.createCreateRequest(ctx, contentLength, blobContentLength, options, blobHTTPHeaders, leaseAccessConditions, cpkInfo, cpkScopeInfo, modifiedAccessConditions)
if err != nil {
return PageBlobClientCreateResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return PageBlobClientCreateResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusCreated) {
return PageBlobClientCreateResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusCreated) {
err = runtime.NewResponseError(httpResp)
return PageBlobClientCreateResponse{}, err
}
return client.createHandleResponse(resp)
resp, err := client.createHandleResponse(httpResp)
return resp, err
}
// createCreateRequest creates the Create request.
@ -401,15 +409,8 @@ func (client *PageBlobClient) createCreateRequest(ctx context.Context, contentLe
// createHandleResponse handles the Create response.
func (client *PageBlobClient) createHandleResponse(resp *http.Response) (PageBlobClientCreateResponse, error) {
result := PageBlobClientCreateResponse{}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientCreateResponse{}, err
}
result.LastModified = &lastModified
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
@ -418,8 +419,35 @@ func (client *PageBlobClient) createHandleResponse(resp *http.Response) (PageBlo
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientCreateResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
return PageBlobClientCreateResponse{}, err
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientCreateResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
@ -430,26 +458,6 @@ func (client *PageBlobClient) createHandleResponse(resp *http.Response) (PageBlo
if val := resp.Header.Get("x-ms-version-id"); val != "" {
result.VersionID = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientCreateResponse{}, err
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
return PageBlobClientCreateResponse{}, err
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
return result, nil
}
@ -467,23 +475,16 @@ func (client *PageBlobClient) NewGetPageRangesPager(options *PageBlobClientGetPa
return page.NextMarker != nil && len(*page.NextMarker) > 0
},
Fetcher: func(ctx context.Context, page *PageBlobClientGetPageRangesResponse) (PageBlobClientGetPageRangesResponse, error) {
var req *policy.Request
var err error
if page == nil {
req, err = client.GetPageRangesCreateRequest(ctx, options, leaseAccessConditions, modifiedAccessConditions)
} else {
req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextMarker)
nextLink := ""
if page != nil {
nextLink = *page.NextMarker
}
resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
return client.GetPageRangesCreateRequest(ctx, options, leaseAccessConditions, modifiedAccessConditions)
}, nil)
if err != nil {
return PageBlobClientGetPageRangesResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
if err != nil {
return PageBlobClientGetPageRangesResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusOK) {
return PageBlobClientGetPageRangesResponse{}, runtime.NewResponseError(resp)
}
return client.GetPageRangesHandleResponse(resp)
},
})
@ -542,16 +543,6 @@ func (client *PageBlobClient) GetPageRangesCreateRequest(ctx context.Context, op
// GetPageRangesHandleResponse handles the GetPageRanges response.
func (client *PageBlobClient) GetPageRangesHandleResponse(resp *http.Response) (PageBlobClientGetPageRangesResponse, error) {
result := PageBlobClientGetPageRangesResponse{}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientGetPageRangesResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("x-ms-blob-content-length"); val != "" {
blobContentLength, err := strconv.ParseInt(val, 10, 64)
if err != nil {
@ -562,12 +553,6 @@ func (client *PageBlobClient) GetPageRangesHandleResponse(resp *http.Response) (
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
@ -575,6 +560,22 @@ func (client *PageBlobClient) GetPageRangesHandleResponse(resp *http.Response) (
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientGetPageRangesResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if err := runtime.UnmarshalAsXML(resp, &result.PageList); err != nil {
return PageBlobClientGetPageRangesResponse{}, err
}
@ -595,23 +596,16 @@ func (client *PageBlobClient) NewGetPageRangesDiffPager(options *PageBlobClientG
return page.NextMarker != nil && len(*page.NextMarker) > 0
},
Fetcher: func(ctx context.Context, page *PageBlobClientGetPageRangesDiffResponse) (PageBlobClientGetPageRangesDiffResponse, error) {
var req *policy.Request
var err error
if page == nil {
req, err = client.GetPageRangesDiffCreateRequest(ctx, options, leaseAccessConditions, modifiedAccessConditions)
} else {
req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextMarker)
nextLink := ""
if page != nil {
nextLink = *page.NextMarker
}
resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
return client.GetPageRangesDiffCreateRequest(ctx, options, leaseAccessConditions, modifiedAccessConditions)
}, nil)
if err != nil {
return PageBlobClientGetPageRangesDiffResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
if err != nil {
return PageBlobClientGetPageRangesDiffResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusOK) {
return PageBlobClientGetPageRangesDiffResponse{}, runtime.NewResponseError(resp)
}
return client.GetPageRangesDiffHandleResponse(resp)
},
})
@ -676,16 +670,6 @@ func (client *PageBlobClient) GetPageRangesDiffCreateRequest(ctx context.Context
// GetPageRangesDiffHandleResponse handles the GetPageRangesDiff response.
func (client *PageBlobClient) GetPageRangesDiffHandleResponse(resp *http.Response) (PageBlobClientGetPageRangesDiffResponse, error) {
result := PageBlobClientGetPageRangesDiffResponse{}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientGetPageRangesDiffResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("x-ms-blob-content-length"); val != "" {
blobContentLength, err := strconv.ParseInt(val, 10, 64)
if err != nil {
@ -696,12 +680,6 @@ func (client *PageBlobClient) GetPageRangesDiffHandleResponse(resp *http.Respons
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
@ -709,6 +687,22 @@ func (client *PageBlobClient) GetPageRangesDiffHandleResponse(resp *http.Respons
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientGetPageRangesDiffResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if err := runtime.UnmarshalAsXML(resp, &result.PageList); err != nil {
return PageBlobClientGetPageRangesDiffResponse{}, err
}
@ -727,18 +721,21 @@ func (client *PageBlobClient) GetPageRangesDiffHandleResponse(resp *http.Respons
// - CPKScopeInfo - CPKScopeInfo contains a group of parameters for the BlobClient.SetMetadata method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
func (client *PageBlobClient) Resize(ctx context.Context, blobContentLength int64, options *PageBlobClientResizeOptions, leaseAccessConditions *LeaseAccessConditions, cpkInfo *CPKInfo, cpkScopeInfo *CPKScopeInfo, modifiedAccessConditions *ModifiedAccessConditions) (PageBlobClientResizeResponse, error) {
var err error
req, err := client.resizeCreateRequest(ctx, blobContentLength, options, leaseAccessConditions, cpkInfo, cpkScopeInfo, modifiedAccessConditions)
if err != nil {
return PageBlobClientResizeResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return PageBlobClientResizeResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusOK) {
return PageBlobClientResizeResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return PageBlobClientResizeResponse{}, err
}
return client.resizeHandleResponse(resp)
resp, err := client.resizeHandleResponse(httpResp)
return resp, err
}
// resizeCreateRequest creates the Resize request.
@ -795,16 +792,6 @@ func (client *PageBlobClient) resizeCreateRequest(ctx context.Context, blobConte
// resizeHandleResponse handles the Resize response.
func (client *PageBlobClient) resizeHandleResponse(resp *http.Response) (PageBlobClientResizeResponse, error) {
result := PageBlobClientResizeResponse{}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientResizeResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-blob-sequence-number"); val != "" {
blobSequenceNumber, err := strconv.ParseInt(val, 10, 64)
if err != nil {
@ -815,12 +802,6 @@ func (client *PageBlobClient) resizeHandleResponse(resp *http.Response) (PageBlo
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
@ -828,6 +809,22 @@ func (client *PageBlobClient) resizeHandleResponse(resp *http.Response) (PageBlo
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientResizeResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
return result, nil
}
@ -842,18 +839,21 @@ func (client *PageBlobClient) resizeHandleResponse(resp *http.Response) (PageBlo
// - LeaseAccessConditions - LeaseAccessConditions contains a group of parameters for the ContainerClient.GetProperties method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
func (client *PageBlobClient) UpdateSequenceNumber(ctx context.Context, sequenceNumberAction SequenceNumberActionType, options *PageBlobClientUpdateSequenceNumberOptions, leaseAccessConditions *LeaseAccessConditions, modifiedAccessConditions *ModifiedAccessConditions) (PageBlobClientUpdateSequenceNumberResponse, error) {
var err error
req, err := client.updateSequenceNumberCreateRequest(ctx, sequenceNumberAction, options, leaseAccessConditions, modifiedAccessConditions)
if err != nil {
return PageBlobClientUpdateSequenceNumberResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return PageBlobClientUpdateSequenceNumberResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusOK) {
return PageBlobClientUpdateSequenceNumberResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return PageBlobClientUpdateSequenceNumberResponse{}, err
}
return client.updateSequenceNumberHandleResponse(resp)
resp, err := client.updateSequenceNumberHandleResponse(httpResp)
return resp, err
}
// updateSequenceNumberCreateRequest creates the UpdateSequenceNumber request.
@ -901,16 +901,6 @@ func (client *PageBlobClient) updateSequenceNumberCreateRequest(ctx context.Cont
// updateSequenceNumberHandleResponse handles the UpdateSequenceNumber response.
func (client *PageBlobClient) updateSequenceNumberHandleResponse(resp *http.Response) (PageBlobClientUpdateSequenceNumberResponse, error) {
result := PageBlobClientUpdateSequenceNumberResponse{}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientUpdateSequenceNumberResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-blob-sequence-number"); val != "" {
blobSequenceNumber, err := strconv.ParseInt(val, 10, 64)
if err != nil {
@ -921,12 +911,6 @@ func (client *PageBlobClient) updateSequenceNumberHandleResponse(resp *http.Resp
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
@ -934,6 +918,22 @@ func (client *PageBlobClient) updateSequenceNumberHandleResponse(resp *http.Resp
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientUpdateSequenceNumberResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
return result, nil
}
@ -951,18 +951,21 @@ func (client *PageBlobClient) updateSequenceNumberHandleResponse(resp *http.Resp
// method.
// - ModifiedAccessConditions - ModifiedAccessConditions contains a group of parameters for the ContainerClient.Delete method.
func (client *PageBlobClient) UploadPages(ctx context.Context, contentLength int64, body io.ReadSeekCloser, options *PageBlobClientUploadPagesOptions, leaseAccessConditions *LeaseAccessConditions, cpkInfo *CPKInfo, cpkScopeInfo *CPKScopeInfo, sequenceNumberAccessConditions *SequenceNumberAccessConditions, modifiedAccessConditions *ModifiedAccessConditions) (PageBlobClientUploadPagesResponse, error) {
var err error
req, err := client.uploadPagesCreateRequest(ctx, contentLength, body, options, leaseAccessConditions, cpkInfo, cpkScopeInfo, sequenceNumberAccessConditions, modifiedAccessConditions)
if err != nil {
return PageBlobClientUploadPagesResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return PageBlobClientUploadPagesResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusCreated) {
return PageBlobClientUploadPagesResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusCreated) {
err = runtime.NewResponseError(httpResp)
return PageBlobClientUploadPagesResponse{}, err
}
return client.uploadPagesHandleResponse(resp)
resp, err := client.uploadPagesHandleResponse(httpResp)
return resp, err
}
// uploadPagesCreateRequest creates the UploadPages request.
@ -1041,30 +1044,6 @@ func (client *PageBlobClient) uploadPagesCreateRequest(ctx context.Context, cont
// uploadPagesHandleResponse handles the UploadPages response.
func (client *PageBlobClient) uploadPagesHandleResponse(resp *http.Response) (PageBlobClientUploadPagesResponse, error) {
result := PageBlobClientUploadPagesResponse{}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientUploadPagesResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return PageBlobClientUploadPagesResponse{}, err
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("x-ms-content-crc64"); val != "" {
contentCRC64, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return PageBlobClientUploadPagesResponse{}, err
}
result.ContentCRC64 = contentCRC64
}
if val := resp.Header.Get("x-ms-blob-sequence-number"); val != "" {
blobSequenceNumber, err := strconv.ParseInt(val, 10, 64)
if err != nil {
@ -1075,11 +1054,19 @@ func (client *PageBlobClient) uploadPagesHandleResponse(resp *http.Response) (Pa
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
if val := resp.Header.Get("x-ms-content-crc64"); val != "" {
contentCRC64, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return PageBlobClientUploadPagesResponse{}, err
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
result.ContentCRC64 = contentCRC64
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return PageBlobClientUploadPagesResponse{}, err
}
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
@ -1088,6 +1075,15 @@ func (client *PageBlobClient) uploadPagesHandleResponse(resp *http.Response) (Pa
}
result.Date = &date
}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
@ -1095,11 +1091,18 @@ func (client *PageBlobClient) uploadPagesHandleResponse(resp *http.Response) (Pa
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientUploadPagesResponse{}, err
}
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
return result, nil
}
@ -1126,18 +1129,21 @@ func (client *PageBlobClient) uploadPagesHandleResponse(resp *http.Response) (Pa
// - SourceModifiedAccessConditions - SourceModifiedAccessConditions contains a group of parameters for the BlobClient.StartCopyFromURL
// method.
func (client *PageBlobClient) UploadPagesFromURL(ctx context.Context, sourceURL string, sourceRange string, contentLength int64, rangeParam string, options *PageBlobClientUploadPagesFromURLOptions, cpkInfo *CPKInfo, cpkScopeInfo *CPKScopeInfo, leaseAccessConditions *LeaseAccessConditions, sequenceNumberAccessConditions *SequenceNumberAccessConditions, modifiedAccessConditions *ModifiedAccessConditions, sourceModifiedAccessConditions *SourceModifiedAccessConditions) (PageBlobClientUploadPagesFromURLResponse, error) {
var err error
req, err := client.uploadPagesFromURLCreateRequest(ctx, sourceURL, sourceRange, contentLength, rangeParam, options, cpkInfo, cpkScopeInfo, leaseAccessConditions, sequenceNumberAccessConditions, modifiedAccessConditions, sourceModifiedAccessConditions)
if err != nil {
return PageBlobClientUploadPagesFromURLResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return PageBlobClientUploadPagesFromURLResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusCreated) {
return PageBlobClientUploadPagesFromURLResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusCreated) {
err = runtime.NewResponseError(httpResp)
return PageBlobClientUploadPagesFromURLResponse{}, err
}
return client.uploadPagesFromURLHandleResponse(resp)
resp, err := client.uploadPagesFromURLHandleResponse(httpResp)
return resp, err
}
// uploadPagesFromURLCreateRequest creates the UploadPagesFromURL request.
@ -1228,22 +1234,12 @@ func (client *PageBlobClient) uploadPagesFromURLCreateRequest(ctx context.Contex
// uploadPagesFromURLHandleResponse handles the UploadPagesFromURL response.
func (client *PageBlobClient) uploadPagesFromURLHandleResponse(resp *http.Response) (PageBlobClientUploadPagesFromURLResponse, error) {
result := PageBlobClientUploadPagesFromURLResponse{}
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if val := resp.Header.Get("x-ms-blob-sequence-number"); val != "" {
blobSequenceNumber, err := strconv.ParseInt(val, 10, 64)
if err != nil {
return PageBlobClientUploadPagesFromURLResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return PageBlobClientUploadPagesFromURLResponse{}, err
}
result.ContentMD5 = contentMD5
result.BlobSequenceNumber = &blobSequenceNumber
}
if val := resp.Header.Get("x-ms-content-crc64"); val != "" {
contentCRC64, err := base64.StdEncoding.DecodeString(val)
@ -1252,18 +1248,12 @@ func (client *PageBlobClient) uploadPagesFromURLHandleResponse(resp *http.Respon
}
result.ContentCRC64 = contentCRC64
}
if val := resp.Header.Get("x-ms-blob-sequence-number"); val != "" {
blobSequenceNumber, err := strconv.ParseInt(val, 10, 64)
if val := resp.Header.Get("Content-MD5"); val != "" {
contentMD5, err := base64.StdEncoding.DecodeString(val)
if err != nil {
return PageBlobClientUploadPagesFromURLResponse{}, err
}
result.BlobSequenceNumber = &blobSequenceNumber
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
result.ContentMD5 = contentMD5
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
@ -1272,12 +1262,8 @@ func (client *PageBlobClient) uploadPagesFromURLHandleResponse(resp *http.Respon
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
return PageBlobClientUploadPagesFromURLResponse{}, err
}
result.IsServerEncrypted = &isServerEncrypted
if val := resp.Header.Get("ETag"); val != "" {
result.ETag = (*azcore.ETag)(&val)
}
if val := resp.Header.Get("x-ms-encryption-key-sha256"); val != "" {
result.EncryptionKeySHA256 = &val
@ -1285,5 +1271,25 @@ func (client *PageBlobClient) uploadPagesFromURLHandleResponse(resp *http.Respon
if val := resp.Header.Get("x-ms-encryption-scope"); val != "" {
result.EncryptionScope = &val
}
if val := resp.Header.Get("x-ms-request-server-encrypted"); val != "" {
isServerEncrypted, err := strconv.ParseBool(val)
if err != nil {
return PageBlobClientUploadPagesFromURLResponse{}, err
}
result.IsServerEncrypted = &isServerEncrypted
}
if val := resp.Header.Get("Last-Modified"); val != "" {
lastModified, err := time.Parse(time.RFC1123, val)
if err != nil {
return PageBlobClientUploadPagesFromURLResponse{}, err
}
result.LastModified = &lastModified
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
return result, nil
}

View file

@ -3,9 +3,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// DO NOT EDIT.
package generated
@ -656,18 +655,20 @@ type BlobClientGetPropertiesResponse struct {
// BlobClientGetTagsResponse contains the response from method BlobClient.GetTags.
type BlobClientGetTagsResponse struct {
// Blob tags
BlobTags
// ClientRequestID contains the information returned from the x-ms-client-request-id header response.
ClientRequestID *string `xml:"ClientRequestID"`
ClientRequestID *string
// Date contains the information returned from the Date header response.
Date *time.Time `xml:"Date"`
Date *time.Time
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string `xml:"RequestID"`
RequestID *string
// Version contains the information returned from the x-ms-version header response.
Version *string `xml:"Version"`
Version *string
}
// BlobClientQueryResponse contains the response from method BlobClient.Query.
@ -1051,29 +1052,30 @@ type BlockBlobClientCommitBlockListResponse struct {
// BlockBlobClientGetBlockListResponse contains the response from method BlockBlobClient.GetBlockList.
type BlockBlobClientGetBlockListResponse struct {
BlockList
// BlobContentLength contains the information returned from the x-ms-blob-content-length header response.
BlobContentLength *int64 `xml:"BlobContentLength"`
BlobContentLength *int64
// ClientRequestID contains the information returned from the x-ms-client-request-id header response.
ClientRequestID *string `xml:"ClientRequestID"`
ClientRequestID *string
// ContentType contains the information returned from the Content-Type header response.
ContentType *string `xml:"ContentType"`
ContentType *string
// Date contains the information returned from the Date header response.
Date *time.Time `xml:"Date"`
Date *time.Time
// ETag contains the information returned from the ETag header response.
ETag *azcore.ETag `xml:"ETag"`
ETag *azcore.ETag
// LastModified contains the information returned from the Last-Modified header response.
LastModified *time.Time `xml:"LastModified"`
LastModified *time.Time
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string `xml:"RequestID"`
RequestID *string
// Version contains the information returned from the x-ms-version header response.
Version *string `xml:"Version"`
Version *string
}
// BlockBlobClientPutBlobFromURLResponse contains the response from method BlockBlobClient.PutBlobFromURL.
@ -1318,45 +1320,47 @@ type ContainerClientDeleteResponse struct {
// ContainerClientFilterBlobsResponse contains the response from method ContainerClient.FilterBlobs.
type ContainerClientFilterBlobsResponse struct {
// The result of a Filter Blobs API call
FilterBlobSegment
// ClientRequestID contains the information returned from the x-ms-client-request-id header response.
ClientRequestID *string `xml:"ClientRequestID"`
ClientRequestID *string
// Date contains the information returned from the Date header response.
Date *time.Time `xml:"Date"`
Date *time.Time
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string `xml:"RequestID"`
RequestID *string
// Version contains the information returned from the x-ms-version header response.
Version *string `xml:"Version"`
Version *string
}
// ContainerClientGetAccessPolicyResponse contains the response from method ContainerClient.GetAccessPolicy.
type ContainerClientGetAccessPolicyResponse struct {
// BlobPublicAccess contains the information returned from the x-ms-blob-public-access header response.
BlobPublicAccess *PublicAccessType `xml:"BlobPublicAccess"`
BlobPublicAccess *PublicAccessType
// ClientRequestID contains the information returned from the x-ms-client-request-id header response.
ClientRequestID *string `xml:"ClientRequestID"`
ClientRequestID *string
// Date contains the information returned from the Date header response.
Date *time.Time `xml:"Date"`
Date *time.Time
// ETag contains the information returned from the ETag header response.
ETag *azcore.ETag `xml:"ETag"`
ETag *azcore.ETag
// LastModified contains the information returned from the Last-Modified header response.
LastModified *time.Time `xml:"LastModified"`
LastModified *time.Time
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string `xml:"RequestID"`
RequestID *string
// a collection of signed identifiers
SignedIdentifiers []*SignedIdentifier `xml:"SignedIdentifier"`
// Version contains the information returned from the x-ms-version header response.
Version *string `xml:"Version"`
Version *string
}
// ContainerClientGetAccountInfoResponse contains the response from method ContainerClient.GetAccountInfo.
@ -1434,40 +1438,44 @@ type ContainerClientGetPropertiesResponse struct {
// ContainerClientListBlobFlatSegmentResponse contains the response from method ContainerClient.NewListBlobFlatSegmentPager.
type ContainerClientListBlobFlatSegmentResponse struct {
// An enumeration of blobs
ListBlobsFlatSegmentResponse
// ClientRequestID contains the information returned from the x-ms-client-request-id header response.
ClientRequestID *string `xml:"ClientRequestID"`
ClientRequestID *string
// ContentType contains the information returned from the Content-Type header response.
ContentType *string `xml:"ContentType"`
ContentType *string
// Date contains the information returned from the Date header response.
Date *time.Time `xml:"Date"`
Date *time.Time
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string `xml:"RequestID"`
RequestID *string
// Version contains the information returned from the x-ms-version header response.
Version *string `xml:"Version"`
Version *string
}
// ContainerClientListBlobHierarchySegmentResponse contains the response from method ContainerClient.NewListBlobHierarchySegmentPager.
type ContainerClientListBlobHierarchySegmentResponse struct {
// An enumeration of blobs
ListBlobsHierarchySegmentResponse
// ClientRequestID contains the information returned from the x-ms-client-request-id header response.
ClientRequestID *string `xml:"ClientRequestID"`
ClientRequestID *string
// ContentType contains the information returned from the Content-Type header response.
ContentType *string `xml:"ContentType"`
ContentType *string
// Date contains the information returned from the Date header response.
Date *time.Time `xml:"Date"`
Date *time.Time
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string `xml:"RequestID"`
RequestID *string
// Version contains the information returned from the x-ms-version header response.
Version *string `xml:"Version"`
Version *string
}
// ContainerClientReleaseLeaseResponse contains the response from method ContainerClient.ReleaseLease.
@ -1697,52 +1705,56 @@ type PageBlobClientCreateResponse struct {
// PageBlobClientGetPageRangesDiffResponse contains the response from method PageBlobClient.NewGetPageRangesDiffPager.
type PageBlobClientGetPageRangesDiffResponse struct {
// the list of pages
PageList
// BlobContentLength contains the information returned from the x-ms-blob-content-length header response.
BlobContentLength *int64 `xml:"BlobContentLength"`
BlobContentLength *int64
// ClientRequestID contains the information returned from the x-ms-client-request-id header response.
ClientRequestID *string `xml:"ClientRequestID"`
ClientRequestID *string
// Date contains the information returned from the Date header response.
Date *time.Time `xml:"Date"`
Date *time.Time
// ETag contains the information returned from the ETag header response.
ETag *azcore.ETag `xml:"ETag"`
ETag *azcore.ETag
// LastModified contains the information returned from the Last-Modified header response.
LastModified *time.Time `xml:"LastModified"`
LastModified *time.Time
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string `xml:"RequestID"`
RequestID *string
// Version contains the information returned from the x-ms-version header response.
Version *string `xml:"Version"`
Version *string
}
// PageBlobClientGetPageRangesResponse contains the response from method PageBlobClient.NewGetPageRangesPager.
type PageBlobClientGetPageRangesResponse struct {
// the list of pages
PageList
// BlobContentLength contains the information returned from the x-ms-blob-content-length header response.
BlobContentLength *int64 `xml:"BlobContentLength"`
BlobContentLength *int64
// ClientRequestID contains the information returned from the x-ms-client-request-id header response.
ClientRequestID *string `xml:"ClientRequestID"`
ClientRequestID *string
// Date contains the information returned from the Date header response.
Date *time.Time `xml:"Date"`
Date *time.Time
// ETag contains the information returned from the ETag header response.
ETag *azcore.ETag `xml:"ETag"`
ETag *azcore.ETag
// LastModified contains the information returned from the Last-Modified header response.
LastModified *time.Time `xml:"LastModified"`
LastModified *time.Time
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string `xml:"RequestID"`
RequestID *string
// Version contains the information returned from the x-ms-version header response.
Version *string `xml:"Version"`
Version *string
}
// PageBlobClientResizeResponse contains the response from method PageBlobClient.Resize.
@ -1870,18 +1882,20 @@ type PageBlobClientUploadPagesResponse struct {
// ServiceClientFilterBlobsResponse contains the response from method ServiceClient.FilterBlobs.
type ServiceClientFilterBlobsResponse struct {
// The result of a Filter Blobs API call
FilterBlobSegment
// ClientRequestID contains the information returned from the x-ms-client-request-id header response.
ClientRequestID *string `xml:"ClientRequestID"`
ClientRequestID *string
// Date contains the information returned from the Date header response.
Date *time.Time `xml:"Date"`
Date *time.Time
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string `xml:"RequestID"`
RequestID *string
// Version contains the information returned from the x-ms-version header response.
Version *string `xml:"Version"`
Version *string
}
// ServiceClientGetAccountInfoResponse contains the response from method ServiceClient.GetAccountInfo.
@ -1910,60 +1924,68 @@ type ServiceClientGetAccountInfoResponse struct {
// ServiceClientGetPropertiesResponse contains the response from method ServiceClient.GetProperties.
type ServiceClientGetPropertiesResponse struct {
// Storage Service Properties.
StorageServiceProperties
// ClientRequestID contains the information returned from the x-ms-client-request-id header response.
ClientRequestID *string `xml:"ClientRequestID"`
ClientRequestID *string
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string `xml:"RequestID"`
RequestID *string
// Version contains the information returned from the x-ms-version header response.
Version *string `xml:"Version"`
Version *string
}
// ServiceClientGetStatisticsResponse contains the response from method ServiceClient.GetStatistics.
type ServiceClientGetStatisticsResponse struct {
// Stats for the storage service.
StorageServiceStats
// ClientRequestID contains the information returned from the x-ms-client-request-id header response.
ClientRequestID *string `xml:"ClientRequestID"`
ClientRequestID *string
// Date contains the information returned from the Date header response.
Date *time.Time `xml:"Date"`
Date *time.Time
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string `xml:"RequestID"`
RequestID *string
// Version contains the information returned from the x-ms-version header response.
Version *string `xml:"Version"`
Version *string
}
// ServiceClientGetUserDelegationKeyResponse contains the response from method ServiceClient.GetUserDelegationKey.
type ServiceClientGetUserDelegationKeyResponse struct {
// A user delegation key
UserDelegationKey
// ClientRequestID contains the information returned from the x-ms-client-request-id header response.
ClientRequestID *string `xml:"ClientRequestID"`
ClientRequestID *string
// Date contains the information returned from the Date header response.
Date *time.Time `xml:"Date"`
Date *time.Time
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string `xml:"RequestID"`
RequestID *string
// Version contains the information returned from the x-ms-version header response.
Version *string `xml:"Version"`
Version *string
}
// ServiceClientListContainersSegmentResponse contains the response from method ServiceClient.NewListContainersSegmentPager.
type ServiceClientListContainersSegmentResponse struct {
// An enumeration of containers
ListContainersSegmentResponse
// ClientRequestID contains the information returned from the x-ms-client-request-id header response.
ClientRequestID *string `xml:"ClientRequestID"`
ClientRequestID *string
// RequestID contains the information returned from the x-ms-request-id header response.
RequestID *string `xml:"RequestID"`
RequestID *string
// Version contains the information returned from the x-ms-version header response.
Version *string `xml:"Version"`
Version *string
}
// ServiceClientSetPropertiesResponse contains the response from method ServiceClient.SetProperties.

View file

@ -3,9 +3,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// DO NOT EDIT.
package generated
@ -38,18 +37,21 @@ type ServiceClient struct {
// - where - Filters the results to return only to return only blobs whose tags match the specified expression.
// - options - ServiceClientFilterBlobsOptions contains the optional parameters for the ServiceClient.FilterBlobs method.
func (client *ServiceClient) FilterBlobs(ctx context.Context, where string, options *ServiceClientFilterBlobsOptions) (ServiceClientFilterBlobsResponse, error) {
var err error
req, err := client.filterBlobsCreateRequest(ctx, where, options)
if err != nil {
return ServiceClientFilterBlobsResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return ServiceClientFilterBlobsResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusOK) {
return ServiceClientFilterBlobsResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return ServiceClientFilterBlobsResponse{}, err
}
return client.filterBlobsHandleResponse(resp)
resp, err := client.filterBlobsHandleResponse(httpResp)
return resp, err
}
// filterBlobsCreateRequest creates the FilterBlobs request.
@ -88,12 +90,6 @@ func (client *ServiceClient) filterBlobsHandleResponse(resp *http.Response) (Ser
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
@ -101,6 +97,12 @@ func (client *ServiceClient) filterBlobsHandleResponse(resp *http.Response) (Ser
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if err := runtime.UnmarshalAsXML(resp, &result.FilterBlobSegment); err != nil {
return ServiceClientFilterBlobsResponse{}, err
}
@ -113,18 +115,21 @@ func (client *ServiceClient) filterBlobsHandleResponse(resp *http.Response) (Ser
// Generated from API version 2023-08-03
// - options - ServiceClientGetAccountInfoOptions contains the optional parameters for the ServiceClient.GetAccountInfo method.
func (client *ServiceClient) GetAccountInfo(ctx context.Context, options *ServiceClientGetAccountInfoOptions) (ServiceClientGetAccountInfoResponse, error) {
var err error
req, err := client.getAccountInfoCreateRequest(ctx, options)
if err != nil {
return ServiceClientGetAccountInfoResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return ServiceClientGetAccountInfoResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusOK) {
return ServiceClientGetAccountInfoResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return ServiceClientGetAccountInfoResponse{}, err
}
return client.getAccountInfoHandleResponse(resp)
resp, err := client.getAccountInfoHandleResponse(httpResp)
return resp, err
}
// getAccountInfoCreateRequest creates the GetAccountInfo request.
@ -145,15 +150,12 @@ func (client *ServiceClient) getAccountInfoCreateRequest(ctx context.Context, op
// getAccountInfoHandleResponse handles the GetAccountInfo response.
func (client *ServiceClient) getAccountInfoHandleResponse(resp *http.Response) (ServiceClientGetAccountInfoResponse, error) {
result := ServiceClientGetAccountInfoResponse{}
if val := resp.Header.Get("x-ms-account-kind"); val != "" {
result.AccountKind = (*AccountKind)(&val)
}
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
@ -161,12 +163,6 @@ func (client *ServiceClient) getAccountInfoHandleResponse(resp *http.Response) (
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-sku-name"); val != "" {
result.SKUName = (*SKUName)(&val)
}
if val := resp.Header.Get("x-ms-account-kind"); val != "" {
result.AccountKind = (*AccountKind)(&val)
}
if val := resp.Header.Get("x-ms-is-hns-enabled"); val != "" {
isHierarchicalNamespaceEnabled, err := strconv.ParseBool(val)
if err != nil {
@ -174,6 +170,15 @@ func (client *ServiceClient) getAccountInfoHandleResponse(resp *http.Response) (
}
result.IsHierarchicalNamespaceEnabled = &isHierarchicalNamespaceEnabled
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-sku-name"); val != "" {
result.SKUName = (*SKUName)(&val)
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
return result, nil
}
@ -184,18 +189,21 @@ func (client *ServiceClient) getAccountInfoHandleResponse(resp *http.Response) (
// Generated from API version 2023-08-03
// - options - ServiceClientGetPropertiesOptions contains the optional parameters for the ServiceClient.GetProperties method.
func (client *ServiceClient) GetProperties(ctx context.Context, options *ServiceClientGetPropertiesOptions) (ServiceClientGetPropertiesResponse, error) {
var err error
req, err := client.getPropertiesCreateRequest(ctx, options)
if err != nil {
return ServiceClientGetPropertiesResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return ServiceClientGetPropertiesResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusOK) {
return ServiceClientGetPropertiesResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return ServiceClientGetPropertiesResponse{}, err
}
return client.getPropertiesHandleResponse(resp)
resp, err := client.getPropertiesHandleResponse(httpResp)
return resp, err
}
// getPropertiesCreateRequest creates the GetProperties request.
@ -244,18 +252,21 @@ func (client *ServiceClient) getPropertiesHandleResponse(resp *http.Response) (S
// Generated from API version 2023-08-03
// - options - ServiceClientGetStatisticsOptions contains the optional parameters for the ServiceClient.GetStatistics method.
func (client *ServiceClient) GetStatistics(ctx context.Context, options *ServiceClientGetStatisticsOptions) (ServiceClientGetStatisticsResponse, error) {
var err error
req, err := client.getStatisticsCreateRequest(ctx, options)
if err != nil {
return ServiceClientGetStatisticsResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return ServiceClientGetStatisticsResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusOK) {
return ServiceClientGetStatisticsResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return ServiceClientGetStatisticsResponse{}, err
}
return client.getStatisticsHandleResponse(resp)
resp, err := client.getStatisticsHandleResponse(httpResp)
return resp, err
}
// getStatisticsCreateRequest creates the GetStatistics request.
@ -285,12 +296,6 @@ func (client *ServiceClient) getStatisticsHandleResponse(resp *http.Response) (S
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
@ -298,6 +303,12 @@ func (client *ServiceClient) getStatisticsHandleResponse(resp *http.Response) (S
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if err := runtime.UnmarshalAsXML(resp, &result.StorageServiceStats); err != nil {
return ServiceClientGetStatisticsResponse{}, err
}
@ -313,18 +324,21 @@ func (client *ServiceClient) getStatisticsHandleResponse(resp *http.Response) (S
// - options - ServiceClientGetUserDelegationKeyOptions contains the optional parameters for the ServiceClient.GetUserDelegationKey
// method.
func (client *ServiceClient) GetUserDelegationKey(ctx context.Context, keyInfo KeyInfo, options *ServiceClientGetUserDelegationKeyOptions) (ServiceClientGetUserDelegationKeyResponse, error) {
var err error
req, err := client.getUserDelegationKeyCreateRequest(ctx, keyInfo, options)
if err != nil {
return ServiceClientGetUserDelegationKeyResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return ServiceClientGetUserDelegationKeyResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusOK) {
return ServiceClientGetUserDelegationKeyResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return ServiceClientGetUserDelegationKeyResponse{}, err
}
return client.getUserDelegationKeyHandleResponse(resp)
resp, err := client.getUserDelegationKeyHandleResponse(httpResp)
return resp, err
}
// getUserDelegationKeyCreateRequest creates the GetUserDelegationKey request.
@ -357,12 +371,6 @@ func (client *ServiceClient) getUserDelegationKeyHandleResponse(resp *http.Respo
if val := resp.Header.Get("x-ms-client-request-id"); val != "" {
result.ClientRequestID = &val
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if val := resp.Header.Get("Date"); val != "" {
date, err := time.Parse(time.RFC1123, val)
if err != nil {
@ -370,6 +378,12 @@ func (client *ServiceClient) getUserDelegationKeyHandleResponse(resp *http.Respo
}
result.Date = &date
}
if val := resp.Header.Get("x-ms-request-id"); val != "" {
result.RequestID = &val
}
if val := resp.Header.Get("x-ms-version"); val != "" {
result.Version = &val
}
if err := runtime.UnmarshalAsXML(resp, &result.UserDelegationKey); err != nil {
return ServiceClientGetUserDelegationKeyResponse{}, err
}
@ -441,18 +455,21 @@ func (client *ServiceClient) ListContainersSegmentHandleResponse(resp *http.Resp
// - storageServiceProperties - The StorageService properties.
// - options - ServiceClientSetPropertiesOptions contains the optional parameters for the ServiceClient.SetProperties method.
func (client *ServiceClient) SetProperties(ctx context.Context, storageServiceProperties StorageServiceProperties, options *ServiceClientSetPropertiesOptions) (ServiceClientSetPropertiesResponse, error) {
var err error
req, err := client.setPropertiesCreateRequest(ctx, storageServiceProperties, options)
if err != nil {
return ServiceClientSetPropertiesResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return ServiceClientSetPropertiesResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusAccepted) {
return ServiceClientSetPropertiesResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusAccepted) {
err = runtime.NewResponseError(httpResp)
return ServiceClientSetPropertiesResponse{}, err
}
return client.setPropertiesHandleResponse(resp)
resp, err := client.setPropertiesHandleResponse(httpResp)
return resp, err
}
// setPropertiesCreateRequest creates the SetProperties request.
@ -504,18 +521,21 @@ func (client *ServiceClient) setPropertiesHandleResponse(resp *http.Response) (S
// - body - Initial data
// - options - ServiceClientSubmitBatchOptions contains the optional parameters for the ServiceClient.SubmitBatch method.
func (client *ServiceClient) SubmitBatch(ctx context.Context, contentLength int64, multipartContentType string, body io.ReadSeekCloser, options *ServiceClientSubmitBatchOptions) (ServiceClientSubmitBatchResponse, error) {
var err error
req, err := client.submitBatchCreateRequest(ctx, contentLength, multipartContentType, body, options)
if err != nil {
return ServiceClientSubmitBatchResponse{}, err
}
resp, err := client.internal.Pipeline().Do(req)
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return ServiceClientSubmitBatchResponse{}, err
}
if !runtime.HasStatusCode(resp, http.StatusAccepted) {
return ServiceClientSubmitBatchResponse{}, runtime.NewResponseError(resp)
if !runtime.HasStatusCode(httpResp, http.StatusAccepted) {
err = runtime.NewResponseError(httpResp)
return ServiceClientSubmitBatchResponse{}, err
}
return client.submitBatchHandleResponse(resp)
resp, err := client.submitBatchHandleResponse(httpResp)
return resp, err
}
// submitBatchCreateRequest creates the SubmitBatch request.

View file

@ -3,9 +3,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// DO NOT EDIT.
package generated
@ -15,29 +14,29 @@ import (
)
const (
rfc1123JSON = `"` + time.RFC1123 + `"`
dateTimeRFC1123JSON = `"` + time.RFC1123 + `"`
)
type timeRFC1123 time.Time
type dateTimeRFC1123 time.Time
func (t timeRFC1123) MarshalJSON() ([]byte, error) {
b := []byte(time.Time(t).Format(rfc1123JSON))
func (t dateTimeRFC1123) MarshalJSON() ([]byte, error) {
b := []byte(time.Time(t).Format(dateTimeRFC1123JSON))
return b, nil
}
func (t timeRFC1123) MarshalText() ([]byte, error) {
func (t dateTimeRFC1123) MarshalText() ([]byte, error) {
b := []byte(time.Time(t).Format(time.RFC1123))
return b, nil
}
func (t *timeRFC1123) UnmarshalJSON(data []byte) error {
p, err := time.Parse(rfc1123JSON, strings.ToUpper(string(data)))
*t = timeRFC1123(p)
func (t *dateTimeRFC1123) UnmarshalJSON(data []byte) error {
p, err := time.Parse(dateTimeRFC1123JSON, strings.ToUpper(string(data)))
*t = dateTimeRFC1123(p)
return err
}
func (t *timeRFC1123) UnmarshalText(data []byte) error {
func (t *dateTimeRFC1123) UnmarshalText(data []byte) error {
p, err := time.Parse(time.RFC1123, string(data))
*t = timeRFC1123(p)
*t = dateTimeRFC1123(p)
return err
}

View file

@ -3,9 +3,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// DO NOT EDIT.
package generated
@ -15,45 +14,45 @@ import (
"time"
)
const (
utcLayoutJSON = `"2006-01-02T15:04:05.999999999"`
utcLayout = "2006-01-02T15:04:05.999999999"
rfc3339JSON = `"` + time.RFC3339Nano + `"`
)
// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases.
var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`)
type timeRFC3339 time.Time
const (
utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"`
utcDateTime = "2006-01-02T15:04:05.999999999"
dateTimeJSON = `"` + time.RFC3339Nano + `"`
)
func (t timeRFC3339) MarshalJSON() (json []byte, err error) {
type dateTimeRFC3339 time.Time
func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) {
tt := time.Time(t)
return tt.MarshalJSON()
}
func (t timeRFC3339) MarshalText() (text []byte, err error) {
func (t dateTimeRFC3339) MarshalText() ([]byte, error) {
tt := time.Time(t)
return tt.MarshalText()
}
func (t *timeRFC3339) UnmarshalJSON(data []byte) error {
layout := utcLayoutJSON
func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error {
layout := utcDateTimeJSON
if tzOffsetRegex.Match(data) {
layout = rfc3339JSON
layout = dateTimeJSON
}
return t.Parse(layout, string(data))
}
func (t *timeRFC3339) UnmarshalText(data []byte) (err error) {
layout := utcLayout
func (t *dateTimeRFC3339) UnmarshalText(data []byte) error {
layout := utcDateTime
if tzOffsetRegex.Match(data) {
layout = time.RFC3339Nano
}
return t.Parse(layout, string(data))
}
func (t *timeRFC3339) Parse(layout, value string) error {
func (t *dateTimeRFC3339) Parse(layout, value string) error {
p, err := time.Parse(layout, strings.ToUpper(value))
*t = timeRFC3339(p)
*t = dateTimeRFC3339(p)
return err
}

View file

@ -3,14 +3,16 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// DO NOT EDIT.
package generated
import (
"encoding/xml"
"errors"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"io"
"strings"
)
@ -19,22 +21,32 @@ type additionalProperties map[string]*string
// UnmarshalXML implements the xml.Unmarshaler interface for additionalProperties.
func (ap *additionalProperties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tokName := ""
for t, err := d.Token(); err == nil; t, err = d.Token() {
tokValue := ""
for {
t, err := d.Token()
if errors.Is(err, io.EOF) {
break
} else if err != nil {
return err
}
switch tt := t.(type) {
case xml.StartElement:
tokName = strings.ToLower(tt.Name.Local)
break
tokValue = ""
case xml.CharData:
if tokName == "" {
continue
}
tokValue = string(tt)
case xml.EndElement:
if tokName == "" {
continue
}
if *ap == nil {
*ap = additionalProperties{}
}
s := string(tt)
(*ap)[tokName] = &s
(*ap)[tokName] = to.Ptr(tokValue)
tokName = ""
break
}
}
return nil

View file

@ -144,9 +144,6 @@ func ParseConnectionString(connectionString string) (ParsedConnectionString, err
// SerializeBlobTags converts tags to generated.BlobTags
func SerializeBlobTags(tagsMap map[string]string) *generated.BlobTags {
if len(tagsMap) == 0 {
return nil
}
blobTagSet := make([]*generated.BlobTag, 0)
for key, val := range tagsMap {
newKey, newVal := key, val
@ -257,3 +254,27 @@ func IsIPEndpointStyle(host string) bool {
}
return net.ParseIP(host) != nil
}
// ReadAtLeast reads from r into buf until it has read at least min bytes.
// It returns the number of bytes copied and an error.
// The EOF error is returned if no bytes were read or
// EOF happened after reading fewer than min bytes.
// If min is greater than the length of buf, ReadAtLeast returns ErrShortBuffer.
// On return, n >= min if and only if err == nil.
// If r returns an error having read at least min bytes, the error is dropped.
// This method is same as io.ReadAtLeast except that it does not
// return io.ErrUnexpectedEOF when fewer than min bytes are read.
func ReadAtLeast(r io.Reader, buf []byte, min int) (n int, err error) {
if len(buf) < min {
return 0, io.ErrShortBuffer
}
for n < min && err == nil {
var nn int
nn, err = r.Read(buf[n:])
n += nn
}
if n >= min {
err = nil
}
return
}

View file

@ -8,6 +8,7 @@ package pageblob
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/sas"
"io"
"net/http"
"net/url"
@ -426,6 +427,12 @@ func (pb *Client) CopyFromURL(ctx context.Context, copySource string, o *blob.Co
return pb.BlobClient().CopyFromURL(ctx, copySource, o)
}
// GetSASURL is a convenience method for generating a SAS token for the currently pointed at Page blob.
// It can only be used if the credential supplied during creation was a SharedKeyCredential.
func (pb *Client) GetSASURL(permissions sas.BlobPermissions, expiry time.Time, o *blob.GetSASURLOptions) (string, error) {
return pb.BlobClient().GetSASURL(permissions, expiry, o)
}
// Concurrent Download Functions -----------------------------------------------------------------------------------------
// DownloadStream reads a range of bytes from a blob. The response also includes the blob's properties and metadata.

View file

@ -82,6 +82,39 @@ func isMatchingScopes(scopesOne []string, scopesTwo string) bool {
return scopeCounter == len(scopesOne)
}
// needsUpgrade returns true if the given key follows the v1.0 schema i.e.,
// it contains an uppercase character (v1.1+ keys are all lowercase)
func needsUpgrade(key string) bool {
for _, r := range key {
if 'A' <= r && r <= 'Z' {
return true
}
}
return false
}
// upgrade a v1.0 cache item by adding a v1.1+ item having the same value and deleting
// the v1.0 item. Callers must hold an exclusive lock on m.
func upgrade[T any](m map[string]T, k string) T {
v1_1Key := strings.ToLower(k)
v, ok := m[k]
if !ok {
// another goroutine did the upgrade while this one was waiting for the write lock
return m[v1_1Key]
}
if v2, ok := m[v1_1Key]; ok {
// cache has an equivalent v1.1+ item, which we prefer because we know it was added
// by a newer version of the module and is therefore more likely to remain valid.
// The v1.0 item may have expired because only v1.0 or earlier would update it.
v = v2
} else {
// add an equivalent item according to the v1.1 schema
m[v1_1Key] = v
}
delete(m, k)
return v
}
// Read reads a storage token from the cache if it exists.
func (m *Manager) Read(ctx context.Context, authParameters authority.AuthParams) (TokenResponse, error) {
tr := TokenResponse{}
@ -255,21 +288,25 @@ func (m *Manager) aadMetadata(ctx context.Context, authorityInfo authority.Info)
func (m *Manager) readAccessToken(homeID string, envAliases []string, realm, clientID string, scopes []string, tokenType, authnSchemeKeyID string) AccessToken {
m.contractMu.RLock()
defer m.contractMu.RUnlock()
// TODO: linear search (over a map no less) is slow for a large number (thousands) of tokens.
// this shows up as the dominating node in a profile. for real-world scenarios this likely isn't
// an issue, however if it does become a problem then we know where to look.
for _, at := range m.contract.AccessTokens {
for k, at := range m.contract.AccessTokens {
if at.HomeAccountID == homeID && at.Realm == realm && at.ClientID == clientID {
if (at.TokenType == tokenType && at.AuthnSchemeKeyID == authnSchemeKeyID) || (at.TokenType == "" && (tokenType == "" || tokenType == "Bearer")) {
if checkAlias(at.Environment, envAliases) {
if isMatchingScopes(scopes, at.Scopes) {
if (strings.EqualFold(at.TokenType, tokenType) && at.AuthnSchemeKeyID == authnSchemeKeyID) || (at.TokenType == "" && (tokenType == "" || tokenType == "Bearer")) {
if checkAlias(at.Environment, envAliases) && isMatchingScopes(scopes, at.Scopes) {
m.contractMu.RUnlock()
if needsUpgrade(k) {
m.contractMu.Lock()
defer m.contractMu.Unlock()
at = upgrade(m.contract.AccessTokens, k)
}
return at
}
}
}
}
}
m.contractMu.RUnlock()
return AccessToken{}
}
@ -310,15 +347,21 @@ func (m *Manager) readRefreshToken(homeID string, envAliases []string, familyID,
// If app is part of the family or if we DO NOT KNOW if it's part of the family, search by family ID, then by client_id (we will know if an app is part of the family after the first token response).
// https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/311fe8b16e7c293462806f397e189a6aa1159769/src/client/Microsoft.Identity.Client/Internal/Requests/Silent/CacheSilentStrategy.cs#L95
m.contractMu.RLock()
defer m.contractMu.RUnlock()
for _, matcher := range matchers {
for _, rt := range m.contract.RefreshTokens {
for k, rt := range m.contract.RefreshTokens {
if matcher(rt) {
m.contractMu.RUnlock()
if needsUpgrade(k) {
m.contractMu.Lock()
defer m.contractMu.Unlock()
rt = upgrade(m.contract.RefreshTokens, k)
}
return rt, nil
}
}
}
m.contractMu.RUnlock()
return accesstokens.RefreshToken{}, fmt.Errorf("refresh token not found")
}
@ -340,14 +383,20 @@ func (m *Manager) writeRefreshToken(refreshToken accesstokens.RefreshToken) erro
func (m *Manager) readIDToken(homeID string, envAliases []string, realm, clientID string) (IDToken, error) {
m.contractMu.RLock()
defer m.contractMu.RUnlock()
for _, idt := range m.contract.IDTokens {
for k, idt := range m.contract.IDTokens {
if idt.HomeAccountID == homeID && idt.Realm == realm && idt.ClientID == clientID {
if checkAlias(idt.Environment, envAliases) {
m.contractMu.RUnlock()
if needsUpgrade(k) {
m.contractMu.Lock()
defer m.contractMu.Unlock()
idt = upgrade(m.contract.IDTokens, k)
}
return idt, nil
}
}
}
m.contractMu.RUnlock()
return IDToken{}, fmt.Errorf("token not found")
}
@ -386,7 +435,6 @@ func (m *Manager) Account(homeAccountID string) shared.Account {
func (m *Manager) readAccount(homeAccountID string, envAliases []string, realm string) (shared.Account, error) {
m.contractMu.RLock()
defer m.contractMu.RUnlock()
// You might ask why, if cache.Accounts is a map, we would loop through all of these instead of using a key.
// We only use a map because the storage contract shared between all language implementations says use a map.
@ -394,11 +442,18 @@ func (m *Manager) readAccount(homeAccountID string, envAliases []string, realm s
// a match in multiple envs (envAlias). That means we either need to hash each possible keyand do the lookup
// or just statically check. Since the design is to have a storage.Manager per user, the amount of keys stored
// is really low (say 2). Each hash is more expensive than the entire iteration.
for _, acc := range m.contract.Accounts {
for k, acc := range m.contract.Accounts {
if acc.HomeAccountID == homeAccountID && checkAlias(acc.Environment, envAliases) && acc.Realm == realm {
m.contractMu.RUnlock()
if needsUpgrade(k) {
m.contractMu.Lock()
defer m.contractMu.Unlock()
acc = upgrade(m.contract.Accounts, k)
}
return acc, nil
}
}
m.contractMu.RUnlock()
return shared.Account{}, fmt.Errorf("account not found")
}
@ -412,13 +467,18 @@ func (m *Manager) writeAccount(account shared.Account) error {
func (m *Manager) readAppMetaData(envAliases []string, clientID string) (AppMetaData, error) {
m.contractMu.RLock()
defer m.contractMu.RUnlock()
for _, app := range m.contract.AppMetaData {
for k, app := range m.contract.AppMetaData {
if checkAlias(app.Environment, envAliases) && app.ClientID == clientID {
m.contractMu.RUnlock()
if needsUpgrade(k) {
m.contractMu.Lock()
defer m.contractMu.Unlock()
app = upgrade(m.contract.AppMetaData, k)
}
return app, nil
}
}
m.contractMu.RUnlock()
return AppMetaData{}, fmt.Errorf("not found")
}

View file

@ -51,7 +51,7 @@ type AuthenticationScheme = authority.AuthenticationScheme
type Account = shared.Account
var errNoAccount = errors.New("no account was specified with public.WithAccount(), or the specified account is invalid")
var errNoAccount = errors.New("no account was specified with public.WithSilentAccount(), or the specified account is invalid")
// clientOptions configures the Client's behavior.
type clientOptions struct {

View file

@ -170,8 +170,7 @@ func NewConfig() *Config {
return &Config{}
}
// Copy will return a shallow copy of the Config object. If any additional
// configurations are provided they will be merged into the new config returned.
// Copy will return a shallow copy of the Config object.
func (c Config) Copy() Config {
cp := c
return cp

View file

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

View file

@ -328,10 +328,12 @@ func AddRetryMiddlewares(stack *smithymiddle.Stack, options AddRetryMiddlewaresO
middleware.LogAttempts = options.LogRetryAttempts
})
if err := stack.Finalize.Add(attempt, smithymiddle.After); err != nil {
// index retry to before signing, if signing exists
if err := stack.Finalize.Insert(attempt, "Signing", smithymiddle.Before); err != nil {
return err
}
if err := stack.Finalize.Add(&MetricsHeader{}, smithymiddle.After); err != nil {
if err := stack.Finalize.Insert(&MetricsHeader{}, attempt.ID(), smithymiddle.After); err != nil {
return err
}
return nil

View file

@ -1,3 +1,11 @@
# v1.26.3 (2024-01-04)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.26.2 (2023-12-20)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.26.1 (2023-12-08)
* **Bug Fix**: Correct loading of [services *] sections into shared config.

View file

@ -3,4 +3,4 @@
package config
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.26.1"
const goModuleVersion = "1.26.3"

View file

@ -1,3 +1,11 @@
# v1.16.14 (2024-01-04)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.16.13 (2023-12-20)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.16.12 (2023-12-08)
* **Dependency Update**: Updated to the latest SDK module versions

View file

@ -0,0 +1,48 @@
package client
import (
"context"
"github.com/aws/smithy-go/middleware"
)
type getIdentityMiddleware struct {
options Options
}
func (*getIdentityMiddleware) ID() string {
return "GetIdentity"
}
func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
return next.HandleFinalize(ctx, in)
}
type signRequestMiddleware struct {
}
func (*signRequestMiddleware) ID() string {
return "Signing"
}
func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
return next.HandleFinalize(ctx, in)
}
type resolveAuthSchemeMiddleware struct {
operation string
options Options
}
func (*resolveAuthSchemeMiddleware) ID() string {
return "ResolveAuthScheme"
}
func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
return next.HandleFinalize(ctx, in)
}

View file

@ -101,6 +101,7 @@ func (c *Client) GetCredentials(ctx context.Context, params *GetCredentialsInput
stack.Serialize.Add(&serializeOpGetCredential{}, smithymiddleware.After)
stack.Build.Add(&buildEndpoint{Endpoint: options.Endpoint}, smithymiddleware.After)
stack.Deserialize.Add(&deserializeOpGetCredential{}, smithymiddleware.After)
addProtocolFinalizerMiddlewares(stack, options, "GetCredentials")
retry.AddRetryMiddlewares(stack, retry.AddRetryMiddlewaresOptions{Retryer: options.Retryer})
middleware.AddSDKAgentKey(middleware.FeatureMetadata, ServiceID)
smithyhttp.AddErrorCloseResponseBodyMiddleware(stack)

View file

@ -0,0 +1,20 @@
package client
import (
"context"
"github.com/aws/smithy-go/middleware"
)
type resolveEndpointV2Middleware struct {
options Options
}
func (*resolveEndpointV2Middleware) ID() string {
return "ResolveEndpointV2"
}
func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
return next.HandleFinalize(ctx, in)
}

View file

@ -146,3 +146,19 @@ func stof(code int) smithy.ErrorFault {
}
return smithy.FaultClient
}
func addProtocolFinalizerMiddlewares(stack *smithymiddleware.Stack, options Options, operation string) error {
if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, smithymiddleware.Before); err != nil {
return fmt.Errorf("add ResolveAuthScheme: %w", err)
}
if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", smithymiddleware.After); err != nil {
return fmt.Errorf("add GetIdentity: %w", err)
}
if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", smithymiddleware.After); err != nil {
return fmt.Errorf("add ResolveEndpointV2: %w", err)
}
if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", smithymiddleware.After); err != nil {
return fmt.Errorf("add Signing: %w", err)
}
return nil
}

View file

@ -3,4 +3,4 @@
package credentials
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.16.12"
const goModuleVersion = "1.16.14"

View file

@ -1,3 +1,7 @@
# v1.14.11 (2024-01-04)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.14.10 (2023-12-07)
* **Dependency Update**: Updated to the latest SDK module versions

View file

@ -56,6 +56,7 @@ type GetDynamicDataOutput struct {
func addGetDynamicDataMiddleware(stack *middleware.Stack, options Options) error {
return addAPIRequestMiddleware(stack,
options,
"GetDynamicData",
buildGetDynamicDataPath,
buildGetDynamicDataOutput)
}

View file

@ -53,6 +53,7 @@ type GetIAMInfoOutput struct {
func addGetIAMInfoMiddleware(stack *middleware.Stack, options Options) error {
return addAPIRequestMiddleware(stack,
options,
"GetIAMInfo",
buildGetIAMInfoPath,
buildGetIAMInfoOutput,
)

View file

@ -54,6 +54,7 @@ type GetInstanceIdentityDocumentOutput struct {
func addGetInstanceIdentityDocumentMiddleware(stack *middleware.Stack, options Options) error {
return addAPIRequestMiddleware(stack,
options,
"GetInstanceIdentityDocument",
buildGetInstanceIdentityDocumentPath,
buildGetInstanceIdentityDocumentOutput,
)

View file

@ -56,6 +56,7 @@ type GetMetadataOutput struct {
func addGetMetadataMiddleware(stack *middleware.Stack, options Options) error {
return addAPIRequestMiddleware(stack,
options,
"GetMetadata",
buildGetMetadataPath,
buildGetMetadataOutput)
}

View file

@ -45,6 +45,7 @@ type GetRegionOutput struct {
func addGetRegionMiddleware(stack *middleware.Stack, options Options) error {
return addAPIRequestMiddleware(stack,
options,
"GetRegion",
buildGetInstanceIdentityDocumentPath,
buildGetRegionOutput,
)

View file

@ -49,6 +49,7 @@ func addGetTokenMiddleware(stack *middleware.Stack, options Options) error {
err := addRequestMiddleware(stack,
options,
"PUT",
"GetToken",
buildGetTokenPath,
buildGetTokenOutput)
if err != nil {

View file

@ -45,6 +45,7 @@ type GetUserDataOutput struct {
func addGetUserDataMiddleware(stack *middleware.Stack, options Options) error {
return addAPIRequestMiddleware(stack,
options,
"GetUserData",
buildGetUserDataPath,
buildGetUserDataOutput)
}

View file

@ -0,0 +1,48 @@
package imds
import (
"context"
"github.com/aws/smithy-go/middleware"
)
type getIdentityMiddleware struct {
options Options
}
func (*getIdentityMiddleware) ID() string {
return "GetIdentity"
}
func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
return next.HandleFinalize(ctx, in)
}
type signRequestMiddleware struct {
}
func (*signRequestMiddleware) ID() string {
return "Signing"
}
func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
return next.HandleFinalize(ctx, in)
}
type resolveAuthSchemeMiddleware struct {
operation string
options Options
}
func (*resolveAuthSchemeMiddleware) ID() string {
return "ResolveAuthScheme"
}
func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
return next.HandleFinalize(ctx, in)
}

View file

@ -0,0 +1,20 @@
package imds
import (
"context"
"github.com/aws/smithy-go/middleware"
)
type resolveEndpointV2Middleware struct {
options Options
}
func (*resolveEndpointV2Middleware) ID() string {
return "ResolveEndpointV2"
}
func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
return next.HandleFinalize(ctx, in)
}

View file

@ -3,4 +3,4 @@
package imds
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.14.10"
const goModuleVersion = "1.14.11"

View file

@ -17,10 +17,11 @@ import (
func addAPIRequestMiddleware(stack *middleware.Stack,
options Options,
operation string,
getPath func(interface{}) (string, error),
getOutput func(*smithyhttp.Response) (interface{}, error),
) (err error) {
err = addRequestMiddleware(stack, options, "GET", getPath, getOutput)
err = addRequestMiddleware(stack, options, "GET", operation, getPath, getOutput)
if err != nil {
return err
}
@ -44,6 +45,7 @@ func addAPIRequestMiddleware(stack *middleware.Stack,
func addRequestMiddleware(stack *middleware.Stack,
options Options,
method string,
operation string,
getPath func(interface{}) (string, error),
getOutput func(*smithyhttp.Response) (interface{}, error),
) (err error) {
@ -101,6 +103,10 @@ func addRequestMiddleware(stack *middleware.Stack,
return err
}
if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil {
return fmt.Errorf("add protocol finalizers: %w", err)
}
// Retry support
return retry.AddRetryMiddlewares(stack, retry.AddRetryMiddlewaresOptions{
Retryer: options.Retryer,
@ -283,3 +289,19 @@ func appendURIPath(base, add string) string {
}
return reqPath
}
func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error {
if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil {
return fmt.Errorf("add ResolveAuthScheme: %w", err)
}
if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil {
return fmt.Errorf("add GetIdentity: %w", err)
}
if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil {
return fmt.Errorf("add ResolveEndpointV2: %w", err)
}
if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil {
return fmt.Errorf("add Signing: %w", err)
}
return nil
}

View file

@ -1,3 +1,19 @@
# v1.15.11 (2024-01-05)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.15.10 (2024-01-04)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.15.9 (2023-12-20)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.15.8 (2023-12-18)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.15.7 (2023-12-08)
* **Dependency Update**: Updated to the latest SDK module versions

View file

@ -3,4 +3,4 @@
package manager
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.15.7"
const goModuleVersion = "1.15.11"

View file

@ -1,3 +1,7 @@
# v1.2.10 (2024-01-04)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.2.9 (2023-12-07)
* **Dependency Update**: Updated to the latest SDK module versions

View file

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

View file

@ -50,6 +50,9 @@
"ca-central-1" : {
"description" : "Canada (Central)"
},
"ca-west-1" : {
"description" : "Canada West (Calgary)"
},
"eu-central-1" : {
"description" : "Europe (Frankfurt)"
},

View file

@ -1,3 +1,7 @@
# v2.5.10 (2024-01-04)
* **Dependency Update**: Updated to the latest SDK module versions
# v2.5.9 (2023-12-07)
* **Dependency Update**: Updated to the latest SDK module versions

View file

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

View file

@ -1,3 +1,7 @@
# v1.2.10 (2024-01-04)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.2.9 (2023-12-07)
* **Dependency Update**: Updated to the latest SDK module versions

View file

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

View file

@ -1,3 +1,7 @@
# v1.2.10 (2024-01-04)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.2.9 (2023-12-07)
* **Dependency Update**: Updated to the latest SDK module versions

View file

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

View file

@ -90,6 +90,19 @@ func AddInputMiddleware(stack *middleware.Stack, options InputMiddlewareOptions)
return err
}
// If trailing checksum is not supported no need for finalize handler to be added.
if options.EnableTrailingChecksum {
trailerMiddleware := &addInputChecksumTrailer{
EnableTrailingChecksum: inputChecksum.EnableTrailingChecksum,
RequireChecksum: inputChecksum.RequireChecksum,
EnableComputePayloadHash: inputChecksum.EnableComputePayloadHash,
EnableDecodedContentLengthHeader: inputChecksum.EnableDecodedContentLengthHeader,
}
if err := stack.Finalize.Insert(trailerMiddleware, "Retry", middleware.After); err != nil {
return err
}
}
return nil
}

View file

@ -75,6 +75,8 @@ type computeInputPayloadChecksum struct {
useTrailer bool
}
type useTrailer struct{}
// ID provides the middleware's identifier.
func (m *computeInputPayloadChecksum) ID() string {
return "AWSChecksum:ComputeInputPayloadChecksum"
@ -178,15 +180,9 @@ func (m *computeInputPayloadChecksum) HandleFinalize(
// ContentSHA256Header middleware handles the header
ctx = v4.SetPayloadHash(ctx, streamingUnsignedPayloadTrailerPayloadHash)
}
m.useTrailer = true
mw := &addInputChecksumTrailer{
EnableTrailingChecksum: m.EnableTrailingChecksum,
RequireChecksum: m.RequireChecksum,
EnableComputePayloadHash: m.EnableComputePayloadHash,
EnableDecodedContentLengthHeader: m.EnableDecodedContentLengthHeader,
}
return mw.HandleFinalize(ctx, in, next)
ctx = middleware.WithStackValue(ctx, useTrailer{}, true)
return next.HandleFinalize(ctx, in)
}
// If trailing checksums are not enabled but protocol is still HTTPS
@ -268,6 +264,9 @@ func (m *addInputChecksumTrailer) HandleFinalize(
) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
if enabled, _ := middleware.GetStackValue(ctx, useTrailer{}).(bool); !enabled {
return next.HandleFinalize(ctx, in)
}
req, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, computeInputTrailingChecksumError{

View file

@ -1,3 +1,7 @@
# v1.10.10 (2024-01-04)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.10.9 (2023-12-07)
* **Dependency Update**: Updated to the latest SDK module versions

View file

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

View file

@ -1,3 +1,7 @@
# v1.16.10 (2024-01-04)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.16.9 (2023-12-07)
* **Dependency Update**: Updated to the latest SDK module versions

View file

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

View file

@ -1,3 +1,19 @@
# v1.48.0 (2024-01-05)
* **Feature**: Support smithy sigv4a trait for codegen.
# v1.47.8 (2024-01-04)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.47.7 (2023-12-20)
* No change notes available for this release.
# v1.47.6 (2023-12-18)
* No change notes available for this release.
# v1.47.5 (2023-12-08)
* **Bug Fix**: Add non-vhostable buckets to request path when using legacy V1 endpoint resolver.

View file

@ -777,6 +777,12 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op
if _, ok := stack.Finalize.Get((*acceptencodingcust.DisableGzip)(nil).ID()); ok {
stack.Finalize.Remove((*acceptencodingcust.DisableGzip)(nil).ID())
}
if _, ok := stack.Finalize.Get((*retry.Attempt)(nil).ID()); ok {
stack.Finalize.Remove((*retry.Attempt)(nil).ID())
}
if _, ok := stack.Finalize.Get((*retry.MetricsHeader)(nil).ID()); ok {
stack.Finalize.Remove((*retry.MetricsHeader)(nil).ID())
}
stack.Deserialize.Clear()
stack.Build.Remove((*awsmiddleware.ClientRequestID)(nil).ID())
stack.Build.Remove("UserAgent")

View file

@ -155,7 +155,15 @@ func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option {
}(),
},
{SchemeID: smithyauth.SchemeIDSigV4A},
{
SchemeID: smithyauth.SchemeIDSigV4A,
SignerProperties: func() smithy.Properties {
var props smithy.Properties
smithyhttp.SetSigV4ASigningName(&props, "s3")
smithyhttp.SetSigV4ASigningRegions(&props, []string{params.Region})
return props
}(),
},
}
}

View file

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

View file

@ -282,6 +282,27 @@ var defaultPartitions = endpoints.Partitions{
}: {
Hostname: "s3.dualstack.ca-central-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "ca-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ca-west-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "s3-fips.ca-west-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "ca-west-1",
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "s3-fips.dualstack.ca-west-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "ca-west-1",
Variant: endpoints.DualStackVariant,
}: {
Hostname: "s3.dualstack.ca-west-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "eu-central-1",
}: endpoints.Endpoint{},
@ -367,6 +388,15 @@ var defaultPartitions = endpoints.Partitions{
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "fips-ca-west-1",
}: endpoints.Endpoint{
Hostname: "s3-fips.ca-west-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "ca-west-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "fips-us-east-1",
}: endpoints.Endpoint{
@ -632,15 +662,61 @@ var defaultPartitions = endpoints.Partitions{
RegionRegex: partitionRegexp.AwsIso,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "fips-us-iso-east-1",
}: endpoints.Endpoint{
Hostname: "s3-fips.us-iso-east-1.c2s.ic.gov",
CredentialScope: endpoints.CredentialScope{
Region: "us-iso-east-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "fips-us-iso-west-1",
}: endpoints.Endpoint{
Hostname: "s3-fips.us-iso-west-1.c2s.ic.gov",
CredentialScope: endpoints.CredentialScope{
Region: "us-iso-west-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "us-iso-east-1",
}: endpoints.Endpoint{
Protocols: []string{"http", "https"},
SignatureVersions: []string{"s3v4"},
},
endpoints.EndpointKey{
Region: "us-iso-east-1",
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "s3-fips.dualstack.us-iso-east-1.c2s.ic.gov",
Protocols: []string{"http", "https"},
SignatureVersions: []string{"s3v4"},
},
endpoints.EndpointKey{
Region: "us-iso-east-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "s3-fips.us-iso-east-1.c2s.ic.gov",
Protocols: []string{"http", "https"},
SignatureVersions: []string{"s3v4"},
},
endpoints.EndpointKey{
Region: "us-iso-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-iso-west-1",
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "s3-fips.dualstack.us-iso-west-1.c2s.ic.gov",
},
endpoints.EndpointKey{
Region: "us-iso-west-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "s3-fips.us-iso-west-1.c2s.ic.gov",
},
},
},
{
@ -664,9 +740,30 @@ var defaultPartitions = endpoints.Partitions{
RegionRegex: partitionRegexp.AwsIsoB,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "fips-us-isob-east-1",
}: endpoints.Endpoint{
Hostname: "s3-fips.us-isob-east-1.sc2s.sgov.gov",
CredentialScope: endpoints.CredentialScope{
Region: "us-isob-east-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "us-isob-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-isob-east-1",
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "s3-fips.dualstack.us-isob-east-1.sc2s.sgov.gov",
},
endpoints.EndpointKey{
Region: "us-isob-east-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "s3-fips.us-isob-east-1.sc2s.sgov.gov",
},
},
},
{

View file

@ -1,3 +1,7 @@
# v1.18.6 (2024-01-04)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.18.5 (2023-12-08)
* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein.

View file

@ -3,4 +3,4 @@
package sso
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.18.5"
const goModuleVersion = "1.18.6"

View file

@ -1,3 +1,7 @@
# v1.21.6 (2024-01-04)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.21.5 (2023-12-08)
* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein.

View file

@ -3,4 +3,4 @@
package ssooidc
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.21.5"
const goModuleVersion = "1.21.6"

View file

@ -1,3 +1,11 @@
# v1.26.7 (2024-01-04)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.26.6 (2023-12-20)
* No change notes available for this release.
# v1.26.5 (2023-12-08)
* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein.

View file

@ -552,6 +552,12 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op
if _, ok := stack.Finalize.Get((*acceptencodingcust.DisableGzip)(nil).ID()); ok {
stack.Finalize.Remove((*acceptencodingcust.DisableGzip)(nil).ID())
}
if _, ok := stack.Finalize.Get((*retry.Attempt)(nil).ID()); ok {
stack.Finalize.Remove((*retry.Attempt)(nil).ID())
}
if _, ok := stack.Finalize.Get((*retry.MetricsHeader)(nil).ID()); ok {
stack.Finalize.Remove((*retry.MetricsHeader)(nil).ID())
}
stack.Deserialize.Clear()
stack.Build.Remove((*awsmiddleware.ClientRequestID)(nil).ID())
stack.Build.Remove("UserAgent")

View file

@ -3,4 +3,4 @@
package sts
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.26.5"
const goModuleVersion = "1.26.7"

View file

@ -183,6 +183,9 @@ var defaultPartitions = endpoints.Partitions{
endpoints.EndpointKey{
Region: "ca-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ca-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-central-1",
}: endpoints.Endpoint{},

View file

@ -442,6 +442,17 @@ func (c *Config) WithUseDualStack(enable bool) *Config {
return c
}
// WithUseFIPSEndpoint sets a config UseFIPSEndpoint value returning a Config
// pointer for chaining.
func (c *Config) WithUseFIPSEndpoint(enable bool) *Config {
if enable {
c.UseFIPSEndpoint = endpoints.FIPSEndpointStateEnabled
} else {
c.UseFIPSEndpoint = endpoints.FIPSEndpointStateDisabled
}
return c
}
// WithEC2MetadataDisableTimeoutOverride sets a config EC2MetadataDisableTimeoutOverride value
// returning a Config pointer for chaining.
func (c *Config) WithEC2MetadataDisableTimeoutOverride(enable bool) *Config {

View file

@ -2,6 +2,7 @@ package ec2metadata
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"net/http"
"sync/atomic"
"time"
@ -65,7 +66,9 @@ func (t *tokenProvider) fetchTokenHandler(r *request.Request) {
switch requestFailureError.StatusCode() {
case http.StatusForbidden, http.StatusNotFound, http.StatusMethodNotAllowed:
atomic.StoreUint32(&t.disabled, 1)
if t.client.Config.LogLevel.Matches(aws.LogDebugWithDeprecated) {
t.client.Config.Logger.Log(fmt.Sprintf("WARN: failed to get session token, falling back to IMDSv1: %v", requestFailureError))
}
case http.StatusBadRequest:
r.Error = requestFailureError
}

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more