diff --git a/go.mod b/go.mod index ba7ffabff..f33274114 100644 --- a/go.mod +++ b/go.mod @@ -6,21 +6,21 @@ module github.com/tus/tusd/v2 go 1.20 require ( - cloud.google.com/go/storage v1.34.0 + cloud.google.com/go/storage v1.35.1 github.com/Acconut/go-httptest-recorder v1.0.0 github.com/Azure/azure-storage-blob-go v0.14.0 github.com/Shopify/toxiproxy/v2 v2.7.0 - github.com/aws/aws-sdk-go-v2 v1.22.0 - github.com/aws/aws-sdk-go-v2/config v1.20.0 - github.com/aws/aws-sdk-go-v2/service/s3 v1.41.0 - github.com/aws/smithy-go v1.16.0 + github.com/aws/aws-sdk-go-v2 v1.23.4 + github.com/aws/aws-sdk-go-v2/config v1.25.10 + github.com/aws/aws-sdk-go-v2/service/s3 v1.47.1 + github.com/aws/smithy-go v1.18.1 github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40 github.com/felixge/fgprof v0.9.3 github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d github.com/golang/mock v1.6.0 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/hashicorp/go-hclog v1.5.0 - github.com/hashicorp/go-plugin v1.5.2 + github.com/hashicorp/go-plugin v1.6.0 github.com/prometheus/client_golang v1.17.0 github.com/rs/zerolog v1.31.0 github.com/sethgrid/pester v1.2.0 @@ -28,32 +28,32 @@ require ( github.com/tus/lockfile v1.2.0 github.com/vimeo/go-util v1.4.1 golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df - google.golang.org/api v0.149.0 + google.golang.org/api v0.152.0 google.golang.org/grpc v1.59.0 google.golang.org/protobuf v1.31.0 gopkg.in/h2non/gock.v1 v1.1.2 ) require ( - cloud.google.com/go v0.110.8 // indirect - cloud.google.com/go/compute v1.23.1 // indirect + cloud.google.com/go v0.110.10 // 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.3 // indirect + cloud.google.com/go/iam v1.1.5 // indirect github.com/Azure/azure-pipeline-go v0.2.3 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.14.0 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.4.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.16.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.18.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.24.0 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.16.8 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.7 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -67,7 +67,7 @@ require ( github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect - github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect + github.com/hashicorp/yamux v0.1.1 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-ieproxy v0.0.1 // indirect github.com/mattn/go-isatty v0.0.19 // indirect @@ -81,17 +81,18 @@ require ( github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/xid v1.5.0 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.13.0 // indirect - golang.org/x/sync v0.4.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/crypto v0.15.0 // indirect + golang.org/x/net v0.18.0 // indirect + golang.org/x/oauth2 v0.14.0 // indirect + golang.org/x/sync v0.5.0 // indirect + golang.org/x/sys v0.14.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-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect + google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 4856e3327..96d635285 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,14 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= -cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= -cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0= -cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= +cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= +cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= +cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/iam v1.1.3 h1:18tKG7DzydKWUnLjonWcJO6wjSCAtzh4GcRKlH/Hrzc= -cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= -cloud.google.com/go/storage v1.34.0 h1:9KHBBTbaHPsNxO043SFmH3pMojjZiW+BFl9H41L7xjk= -cloud.google.com/go/storage v1.34.0/go.mod h1:Eji+S0CCQebjsiXxyIvPItC3BN3zWsdJjWfHfoLblgY= +cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= +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= github.com/Acconut/go-httptest-recorder v1.0.0 h1:TAv2dfnqp/l+SUvIaMAUK4GeN4+wqb6KZsFFFTGhoJg= github.com/Acconut/go-httptest-recorder v1.0.0/go.mod h1:CwQyhTH1kq/gLyWiRieo7c0uokpu3PXeyF/nZjUNtmM= github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U= @@ -29,42 +29,42 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Shopify/toxiproxy/v2 v2.7.0 h1:Zz2jdyqtYw1SpihfMWzLFGpOO92p9effjAkURG57ifc= github.com/Shopify/toxiproxy/v2 v2.7.0/go.mod h1:k0V84e/dLQmVNuI6S0G7TpXCl611OSRYdptoxm0XTzA= -github.com/aws/aws-sdk-go-v2 v1.22.0 h1:CpTS3XO3MWNel8ohoazkLZC6scvkYL2k+m0yzFJ17Hg= -github.com/aws/aws-sdk-go-v2 v1.22.0/go.mod h1:Kd0OJtkW3Q0M0lUWGszapWjEvrXDzRW+D21JNsroB+c= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 h1:hHgLiIrTRtddC0AKcJr5s7i/hLgcpTt+q/FKxf1Zayk= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0/go.mod h1:w4I/v3NOWgD+qvs1NPEwhd++1h3XPHFaVxasfY6HlYQ= -github.com/aws/aws-sdk-go-v2/config v1.20.0 h1:q2+/mqFhY0J9m3Tb5RGFE3R4sdaUkIe4k2EuDfE3c08= -github.com/aws/aws-sdk-go-v2/config v1.20.0/go.mod h1:7+1riCZXyT+sAGvneR5j+Zl1GyfbBUNQurpQTE6FP6k= -github.com/aws/aws-sdk-go-v2/credentials v1.14.0 h1:LQquqPE7cL55RQmA/UBoBKehDlEtMnQKm3B0Q672ePE= -github.com/aws/aws-sdk-go-v2/credentials v1.14.0/go.mod h1:q/3oaTPlamrQWHPwJe56Mjq9g1TYDgddvgTgWJtHTmE= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.0 h1:lF/cVllNAPKgjDwN2RsQUX9g/f6hXer9f10ubLFSoug= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.0/go.mod h1:c28nJNzMVVb9TQpZ5q4tzZvwEJwf/7So7Ie2s90l1Fw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.0 h1:tN6dNNE4SzMuyMnVtQJXGVKX177/d5Zy4MuA1HA4KUc= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.0/go.mod h1:F6MXWETIeetAHwFHyoHEqrcB3NpijFv9nLP5h9CXtT0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.0 h1:bfdsbTARDjaC/dSYGMO+E0psxFU4hTvCLnqYAfZ3D38= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.0/go.mod h1:Jg8XVv5M2V2wiAMvBFx+O59jg6Yr8vhP0bgNF/IuquM= -github.com/aws/aws-sdk-go-v2/internal/ini v1.4.0 h1:21tlTXq3ev10yLMAjXZzpkZbrl49h3ElSjmxD57tD/E= -github.com/aws/aws-sdk-go-v2/internal/ini v1.4.0/go.mod h1:d9YrBHJhyzDCv5UsEVRizHlFV6Q0sLemFq6uxuqWfUw= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.0 h1:NpsAO1LaZyc72xMoQB/qgcOwI9Ag1d5FvaEp+omzFqg= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.0/go.mod h1:6WVV80e6jigvvX0QqFDx3tjUME7qtNV9AJqGAZyc/R8= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.0 h1:CJxo7ZBbaIzmXfV3hjcx36n9V87gJsIUPJflwqEHl3Q= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.0/go.mod h1:yjVfjuY4nD1EW9i387Kau+I6V5cBA5YnC/mWNopjZrI= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.0 h1:Wnw0IZKxx/PlKWbrUssl3Z2FP7cJS30QAeN1MuDVh1Q= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.0/go.mod h1:3ZHaPNnLwe0E+gAvdlA3Tl7M3SHohQloXL4hiDk1nec= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.0 h1:dJnwy5Awv+uvfk73aRENVbv1cSQQ60ydCkPaun097KM= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.0/go.mod h1:RsPWWy7u/hwmFX57sQ7MLvrvJeYyNkiMm5BaavpoU18= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.0 h1:Kcts/mLwm4LxbF8YULGzilm+IeI4cBoesFUJpSsCcx0= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.0/go.mod h1:ca7+eyqTRByXctslWXXqhSwItEk+4y30azwLYJBBlsU= -github.com/aws/aws-sdk-go-v2/service/s3 v1.41.0 h1:XJfQwEGLnoqdVQtf+faXr7DMm/Q65SkgnGZJKWxIkPc= -github.com/aws/aws-sdk-go-v2/service/s3 v1.41.0/go.mod h1:DDsTwoAqmg5h2Up70/2XeCA4woeYdaD71PRucUwltFM= -github.com/aws/aws-sdk-go-v2/service/sso v1.16.0 h1:ZIlR6Wr/EgYwBdEz1NWBqdUsTh0mV7A68pId3YZl6H0= -github.com/aws/aws-sdk-go-v2/service/sso v1.16.0/go.mod h1:O7B5cpuhhJKefAKkM7onb0McmpHyKnsH4RrHJhOyq7M= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.18.0 h1:3BZyJei4k1SHdSAFhg9Qg15NnG3v5zosZyFWPm7df/A= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.18.0/go.mod h1:Td8EvzggonY02wLaqSpwybI3GbmA0PWoprKGil2uwJg= -github.com/aws/aws-sdk-go-v2/service/sts v1.24.0 h1:f/V5Y9OaHuNRrA9MntNQNAtMFXqhKj8HTEPnH81eXMI= -github.com/aws/aws-sdk-go-v2/service/sts v1.24.0/go.mod h1:HnCUMNz2XqwnEEk5X6oeDYB2HgOLFpJ/LyfilN8WErs= -github.com/aws/smithy-go v1.16.0 h1:gJZEH/Fqh+RsvlJ1Zt4tVAtV6bKkp3cC+R6FCZMNzik= -github.com/aws/smithy-go v1.16.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/aws-sdk-go-v2 v1.23.4 h1:2P20ZjH0ouSAu/6yZep8oCmTReathLuEu6dwoqEgjts= +github.com/aws/aws-sdk-go-v2 v1.23.4/go.mod h1:t3szzKfP0NeRU27uBFczDivYJjsmSnqI8kIvKyWb9ds= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 h1:Zx9+31KyB8wQna6SXFWOewlgoY5uGdDAu6PTOEU3OQI= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3/go.mod h1:zxbEJhRdKTH1nqS2qu6UJ7zGe25xaHxZXaC2CvuQFnA= +github.com/aws/aws-sdk-go-v2/config v1.25.10 h1:qw/e8emDtNufTkrAU86DlQ18DruMyyM7ttW6Lgwp4v0= +github.com/aws/aws-sdk-go-v2/config v1.25.10/go.mod h1:203YiAtb6XyoGxXMPsUVwEcuxCiTQY/r8P27IDjfvMc= +github.com/aws/aws-sdk-go-v2/credentials v1.16.8 h1:phw9nRLy/77bPk6Mfu2SHCOnHwfVB7WWrOa5rZIY2Fc= +github.com/aws/aws-sdk-go-v2/credentials v1.16.8/go.mod h1:MrS4SOin6adbO6wgWhdifyPiq+TX7fPPwyA/ZLC1F5M= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 h1:tQZLSPC2Zj2CqZHonLmWEvCsbpMX5tQvaYJWHadcPek= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8/go.mod h1:5+YpvTHDFffykWr5qAGjqwoh8oVYZOddL3sSrEN7lws= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 h1:eMqD7ku6WGdmcWWXPYun9m6yk6feSULLhJlAtN6rYG4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7/go.mod h1:0oBIfcDV6LScxEW0VgOqxT3e4aqKRp+SYhB9wAd5E3Q= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 h1:+XYhWhgWs5F3Zx8oa49CXzNvfXrItaDjZB/M172fcHQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7/go.mod h1:L6tcSRyCGxcKfDWUrmv2jv8G1cLDU7d0FUpEFpG9bVE= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 h1:uR9lXYjdPX0xY+NhvaJ4dD8rpSRz5VY81ccIIoNG+lw= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.7 h1:3VaUNB1LclLomv82VnP5QnxAfowG+Ro4m82+af9wjZ4= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.7/go.mod h1:D5i0c+qvEY0LV5F4elFZd+mYnvHQbufCLHNHoBfQR2g= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 h1:e3PCNeEaev/ZF01cQyNZgmYE9oYYePIMJs2mWSKG514= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3/go.mod h1:gIeeNyaL8tIEqZrzAnTeyhHcE0yysCtcaP+N9kxLZ+E= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.7 h1:Mft1tmIK1fkFS9l9sYVYiN+OdgXeOcQ9ZS3SxKOh3A4= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.7/go.mod h1:QWI83fhocxDaN3b74N8rrvET60CBaike5lQ+5sm3OcE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 h1:dU+ZyhvqMB/T/TxjGagHMCdyUiqaThRIaMu3YvKiSQI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7/go.mod h1:SGORuNqoXyWfTvTp/gBGJfv8jRvW/+nha0XhnIXVI+o= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.7 h1:ybtGXm0qFVFi0hFUF7eFAVnL3ntl9MO7lrxhhGP7KYU= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.7/go.mod h1:BUyWJUKAnNqoEq1LfyQxy+Eh4U8Y3c5w2C6m21f3yvI= +github.com/aws/aws-sdk-go-v2/service/s3 v1.47.1 h1:0/W5F+LlXzKZ7KTsRcD8pugasVnsrjUWmhOsN/LdSFY= +github.com/aws/aws-sdk-go-v2/service/s3 v1.47.1/go.mod h1:TqThLn4bRCn/UYf960hNZgPPjmxc17fQcwmjfuG6D5k= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 h1:V40g2daNO3l1J94JYwqfkyvQMYXi5I25fs3fNQW8iDs= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.1/go.mod h1:0ZWQJP/mBOUxkCvZKybZNz1XmdUKSBxoF0dzgfxtvDs= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 h1:uQrj7SpUNC3r55vc1CDh3qV9wJC66lz546xM9dhSo5s= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1/go.mod h1:oyaTk5xEAOuPXX1kCD7HmIeuLqdj3Bk5yGkqGXtGi14= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 h1:K33V7L0XDdb23FMOZySr8bon1jou5SHn1fiv7NJ1SUg= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.1/go.mod h1:YtXUl/sfnS06VksYhr855hTQf2HphfT1Xv/EwuzbPjg= +github.com/aws/smithy-go v1.18.1 h1:pOdBTUfXNazOlxLrgeYalVnuTpKreACHtc62xLwIB3c= +github.com/aws/smithy-go v1.18.1/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -150,10 +150,10 @@ github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslC github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= -github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= +github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -239,8 +239,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= @@ -263,11 +263,11 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= -golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= +golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= +golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= 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= @@ -275,8 +275,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +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/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -297,14 +297,16 @@ golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -321,8 +323,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY= -google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= +google.golang.org/api v0.152.0 h1:t0r1vPnfMc260S2Ci+en7kfCZaLOPs5KI0sVV/6jZrY= +google.golang.org/api v0.152.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= 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.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= @@ -331,12 +333,12 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= -google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= diff --git a/pkg/s3store/s3store.go b/pkg/s3store/s3store.go index 1439d43be..bda53dd63 100644 --- a/pkg/s3store/s3store.go +++ b/pkg/s3store/s3store.go @@ -391,7 +391,7 @@ func (upload *s3Upload) writeInfo(ctx context.Context, info handler.FileInfo) er Bucket: aws.String(store.Bucket), Key: store.metadataKeyWithPrefix(upload.objectId + ".info"), Body: bytes.NewReader(infoJson), - ContentLength: int64(len(infoJson)), + ContentLength: aws.Int64(int64(len(infoJson))), }) store.observeRequestDuration(t, metricPutInfoObject) @@ -507,7 +507,7 @@ func (upload *s3Upload) uploadParts(ctx context.Context, offset int64, src io.Re Bucket: aws.String(store.Bucket), Key: store.keyWithPrefix(upload.objectId), UploadId: aws.String(upload.multipartId), - PartNumber: part.number, + PartNumber: aws.Int32(part.number), } etag, err := upload.putPartForUpload(ctx, uploadPartInput, file, part.size) store.observeRequestDuration(t, metricUploadPart) @@ -743,7 +743,7 @@ func (upload s3Upload) GetReader(ctx context.Context) (io.ReadCloser, error) { Bucket: aws.String(store.Bucket), Key: store.keyWithPrefix(upload.objectId), UploadId: aws.String(upload.multipartId), - MaxParts: 0, + MaxParts: aws.Int32(0), }) if err == nil { // The multipart upload still exists, which means we cannot download it yet @@ -800,7 +800,7 @@ func (upload s3Upload) Terminate(ctx context.Context) error { Key: store.metadataKeyWithPrefix(upload.objectId + ".info"), }, }, - Quiet: true, + Quiet: aws.Bool(true), }, }) @@ -842,7 +842,7 @@ func (upload s3Upload) FinishUpload(ctx context.Context) error { Bucket: aws.String(store.Bucket), Key: store.keyWithPrefix(upload.objectId), UploadId: aws.String(upload.multipartId), - PartNumber: 1, + PartNumber: aws.Int32(1), Body: bytes.NewReader([]byte{}), }) if err != nil { @@ -866,7 +866,7 @@ func (upload s3Upload) FinishUpload(ctx context.Context) error { for index, part := range parts { completedParts[index] = types.CompletedPart{ ETag: aws.String(part.etag), - PartNumber: part.number, + PartNumber: aws.Int32(part.number), } } @@ -992,7 +992,7 @@ func (upload *s3Upload) concatUsingMultipart(ctx context.Context, partialUploads Bucket: aws.String(store.Bucket), Key: store.keyWithPrefix(upload.objectId), UploadId: aws.String(upload.multipartId), - PartNumber: partNumber, + PartNumber: aws.Int32(partNumber), CopySource: aws.String(store.Bucket + "/" + *store.keyWithPrefix(sourceObject)), }) if err != nil { @@ -1044,13 +1044,13 @@ func (store S3Store) listAllParts(ctx context.Context, objectId string, multipar parts = slices.Grow(parts, len(parts)+len((*listPtr).Parts)) for _, part := range (*listPtr).Parts { parts = append(parts, &s3Part{ - number: part.PartNumber, - size: part.Size, + number: *part.PartNumber, + size: *part.Size, etag: *part.ETag, }) } - if listPtr.IsTruncated { + if listPtr.IsTruncated != nil && *listPtr.IsTruncated { partMarker = listPtr.NextPartNumberMarker } else { break @@ -1081,7 +1081,7 @@ func (store S3Store) downloadIncompletePartForUpload(ctx context.Context, upload if err != nil { return nil, err } - if n < incompleteUploadObject.ContentLength { + if n < *incompleteUploadObject.ContentLength { return nil, errors.New("short read of incomplete upload") } @@ -1121,7 +1121,7 @@ func (store S3Store) headIncompletePartForUpload(ctx context.Context, uploadId s return 0, err } - return obj.ContentLength, nil + return *obj.ContentLength, nil } func (store S3Store) putIncompletePartForUpload(ctx context.Context, uploadId string, file io.ReadSeeker) error { diff --git a/pkg/s3store/s3store_test.go b/pkg/s3store/s3store_test.go index be5253729..97e122b78 100644 --- a/pkg/s3store/s3store_test.go +++ b/pkg/s3store/s3store_test.go @@ -55,7 +55,7 @@ func TestNewUpload(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("uploadId.info"), Body: bytes.NewReader([]byte(`{"ID":"uploadId+multipartId","Size":500,"SizeIsDeferred":false,"Offset":0,"MetaData":{"bar":"menü\r\nhi","foo":"hello"},"IsPartial":false,"IsFinal":false,"PartialUploads":null,"Storage":{"Bucket":"bucket","Key":"uploadId","Type":"s3store"}}`)), - ContentLength: 241, + ContentLength: aws.Int64(241), }), ) @@ -100,7 +100,7 @@ func TestNewUploadWithObjectPrefix(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("my/uploaded/files/uploadId.info"), Body: bytes.NewReader([]byte(`{"ID":"uploadId+multipartId","Size":500,"SizeIsDeferred":false,"Offset":0,"MetaData":{"bar":"menü","foo":"hello"},"IsPartial":false,"IsFinal":false,"PartialUploads":null,"Storage":{"Bucket":"bucket","Key":"my/uploaded/files/uploadId","Type":"s3store"}}`)), - ContentLength: 253, + ContentLength: aws.Int64(253), }), ) @@ -146,7 +146,7 @@ func TestNewUploadWithMetadataObjectPrefix(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("my/metadata/uploadId.info"), Body: bytes.NewReader([]byte(`{"ID":"uploadId+multipartId","Size":500,"SizeIsDeferred":false,"Offset":0,"MetaData":{"bar":"menü","foo":"hello"},"IsPartial":false,"IsFinal":false,"PartialUploads":null,"Storage":{"Bucket":"bucket","Key":"my/uploaded/files/uploadId","Type":"s3store"}}`)), - ContentLength: 253, + ContentLength: aws.Int64(253), }), ) @@ -187,13 +187,13 @@ func TestEmptyUpload(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("uploadId.info"), Body: bytes.NewReader([]byte(`{"ID":"uploadId+multipartId","Size":0,"SizeIsDeferred":false,"Offset":0,"MetaData":null,"IsPartial":false,"IsFinal":false,"PartialUploads":null,"Storage":{"Bucket":"bucket","Key":"uploadId","Type":"s3store"}}`)), - ContentLength: 208, + ContentLength: aws.Int64(208), }), s3obj.EXPECT().UploadPart(context.Background(), NewUploadPartInputMatcher(&s3.UploadPartInput{ Bucket: aws.String("bucket"), Key: aws.String("uploadId"), UploadId: aws.String("multipartId"), - PartNumber: 1, + PartNumber: aws.Int32(1), Body: bytes.NewReader([]byte("")), })).Return(&s3.UploadPartOutput{ ETag: aws.String("etag"), @@ -206,7 +206,7 @@ func TestEmptyUpload(t *testing.T) { Parts: []types.CompletedPart{ { ETag: aws.String("etag"), - PartNumber: 1, + PartNumber: aws.Int32(1), }, }, }, @@ -300,19 +300,19 @@ func TestGetInfo(t *testing.T) { }).Return(&s3.ListPartsOutput{ Parts: []types.Part{ { - PartNumber: 1, - Size: 100, + PartNumber: aws.Int32(1), + Size: aws.Int64(100), ETag: aws.String("etag-1"), }, { - PartNumber: 2, - Size: 200, + PartNumber: aws.Int32(2), + Size: aws.Int64(200), ETag: aws.String("etag-2"), }, }, NextPartNumberMarker: aws.String("2"), // Simulate a truncated response, so s3store should send a second request - IsTruncated: true, + IsTruncated: aws.Bool(true), }, nil) s3obj.EXPECT().ListParts(context.Background(), &s3.ListPartsInput{ Bucket: aws.String("bucket"), @@ -322,8 +322,8 @@ func TestGetInfo(t *testing.T) { }).Return(&s3.ListPartsOutput{ Parts: []types.Part{ { - PartNumber: 3, - Size: 100, + PartNumber: aws.Int32(3), + Size: aws.Int64(100), ETag: aws.String("etag-3"), }, }, @@ -371,19 +371,19 @@ func TestGetInfoWithMetadataObjectPrefix(t *testing.T) { }).Return(&s3.ListPartsOutput{ Parts: []types.Part{ { - PartNumber: 1, - Size: 100, + PartNumber: aws.Int32(1), + Size: aws.Int64(100), ETag: aws.String("etag-1"), }, { - PartNumber: 2, - Size: 200, + PartNumber: aws.Int32(2), + Size: aws.Int64(200), ETag: aws.String("etag-2"), }, }, NextPartNumberMarker: aws.String("2"), // Simulate a truncated response, so s3store should send a second request - IsTruncated: true, + IsTruncated: aws.Bool(true), }, nil) s3obj.EXPECT().ListParts(context.Background(), &s3.ListPartsInput{ Bucket: aws.String("bucket"), @@ -393,8 +393,8 @@ func TestGetInfoWithMetadataObjectPrefix(t *testing.T) { }).Return(&s3.ListPartsOutput{ Parts: []types.Part{ { - PartNumber: 3, - Size: 100, + PartNumber: aws.Int32(3), + Size: aws.Int64(100), ETag: aws.String("etag-3"), }, }, @@ -443,7 +443,7 @@ func TestGetInfoWithIncompletePart(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("uploadId.part"), }).Return(&s3.HeadObjectOutput{ - ContentLength: 10, + ContentLength: aws.Int64(10), }, nil) upload, err := store.GetUpload(context.Background(), "uploadId+multipartId") @@ -529,7 +529,7 @@ func TestGetReaderNotFound(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("uploadId"), UploadId: aws.String("multipartId"), - MaxParts: 0, + MaxParts: aws.Int32(0), }).Return(nil, &types.NoSuchUpload{}), ) @@ -558,7 +558,7 @@ func TestGetReaderNotFinished(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("uploadId"), UploadId: aws.String("multipartId"), - MaxParts: 0, + MaxParts: aws.Int32(0), }).Return(&s3.ListPartsOutput{ Parts: []types.Part{}, }, nil), @@ -602,7 +602,7 @@ func TestDeclareLength(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("uploadId.info"), Body: bytes.NewReader([]byte(`{"ID":"uploadId+multipartId","Size":500,"SizeIsDeferred":false,"Offset":0,"MetaData":{},"IsPartial":false,"IsFinal":false,"PartialUploads":null,"Storage":{"Bucket":"bucket","Key":"uploadId","Type":"s3store"}}`)), - ContentLength: 208, + ContentLength: aws.Int64(208), }) upload, err := store.GetUpload(context.Background(), "uploadId+multipartId") @@ -637,18 +637,18 @@ func TestFinishUpload(t *testing.T) { }).Return(&s3.ListPartsOutput{ Parts: []types.Part{ { - Size: 100, + Size: aws.Int64(100), ETag: aws.String("etag-1"), - PartNumber: 1, + PartNumber: aws.Int32(1), }, { - Size: 200, + Size: aws.Int64(200), ETag: aws.String("etag-2"), - PartNumber: 2, + PartNumber: aws.Int32(2), }, }, NextPartNumberMarker: aws.String("2"), - IsTruncated: true, + IsTruncated: aws.Bool(true), }, nil) s3obj.EXPECT().ListParts(context.Background(), &s3.ListPartsInput{ Bucket: aws.String("bucket"), @@ -658,9 +658,9 @@ func TestFinishUpload(t *testing.T) { }).Return(&s3.ListPartsOutput{ Parts: []types.Part{ { - Size: 100, + Size: aws.Int64(100), ETag: aws.String("etag-3"), - PartNumber: 3, + PartNumber: aws.Int32(3), }, }, }, nil) @@ -676,15 +676,15 @@ func TestFinishUpload(t *testing.T) { Parts: []types.CompletedPart{ { ETag: aws.String("etag-1"), - PartNumber: 1, + PartNumber: aws.Int32(1), }, { ETag: aws.String("etag-2"), - PartNumber: 2, + PartNumber: aws.Int32(2), }, { ETag: aws.String("etag-3"), - PartNumber: 3, + PartNumber: aws.Int32(3), }, }, }, @@ -725,14 +725,14 @@ func TestWriteChunk(t *testing.T) { }).Return(&s3.ListPartsOutput{ Parts: []types.Part{ { - Size: 100, + Size: aws.Int64(100), ETag: aws.String("etag-1"), - PartNumber: 1, + PartNumber: aws.Int32(1), }, { - Size: 200, + Size: aws.Int64(200), ETag: aws.String("etag-2"), - PartNumber: 2, + PartNumber: aws.Int32(2), }, }, }, nil) @@ -746,7 +746,7 @@ func TestWriteChunk(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("uploadId"), UploadId: aws.String("multipartId"), - PartNumber: 3, + PartNumber: aws.Int32(3), Body: bytes.NewReader([]byte("1234")), })).Return(&s3.UploadPartOutput{ ETag: aws.String("etag-3"), @@ -755,7 +755,7 @@ func TestWriteChunk(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("uploadId"), UploadId: aws.String("multipartId"), - PartNumber: 4, + PartNumber: aws.Int32(4), Body: bytes.NewReader([]byte("5678")), })).Return(&s3.UploadPartOutput{ ETag: aws.String("etag-4"), @@ -764,7 +764,7 @@ func TestWriteChunk(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("uploadId"), UploadId: aws.String("multipartId"), - PartNumber: 5, + PartNumber: aws.Int32(5), Body: bytes.NewReader([]byte("90AB")), })).Return(&s3.UploadPartOutput{ ETag: aws.String("etag-5"), @@ -805,14 +805,14 @@ func TestWriteChunkWriteIncompletePartBecauseTooSmall(t *testing.T) { }).Return(&s3.ListPartsOutput{ Parts: []types.Part{ { - Size: 100, + Size: aws.Int64(100), ETag: aws.String("etag-1"), - PartNumber: 1, + PartNumber: aws.Int32(1), }, { - Size: 200, + Size: aws.Int64(200), ETag: aws.String("etag-2"), - PartNumber: 2, + PartNumber: aws.Int32(2), }, }, }, nil) @@ -866,13 +866,13 @@ func TestWriteChunkPrependsIncompletePart(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("uploadId.part"), }).Return(&s3.HeadObjectOutput{ - ContentLength: 3, + ContentLength: aws.Int64(3), }, nil) s3obj.EXPECT().GetObject(context.Background(), &s3.GetObjectInput{ Bucket: aws.String("bucket"), Key: aws.String("uploadId.part"), }).Return(&s3.GetObjectOutput{ - ContentLength: 3, + ContentLength: aws.Int64(3), Body: io.NopCloser(bytes.NewReader([]byte("123"))), }, nil) s3obj.EXPECT().DeleteObject(context.Background(), &s3.DeleteObjectInput{ @@ -884,7 +884,7 @@ func TestWriteChunkPrependsIncompletePart(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("uploadId"), UploadId: aws.String("multipartId"), - PartNumber: 1, + PartNumber: aws.Int32(1), Body: bytes.NewReader([]byte("1234")), })).Return(&s3.UploadPartOutput{ ETag: aws.String("etag-1"), @@ -893,7 +893,7 @@ func TestWriteChunkPrependsIncompletePart(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("uploadId"), UploadId: aws.String("multipartId"), - PartNumber: 2, + PartNumber: aws.Int32(2), Body: bytes.NewReader([]byte("5")), })).Return(&s3.UploadPartOutput{ ETag: aws.String("etag-2"), @@ -936,13 +936,13 @@ func TestWriteChunkPrependsIncompletePartAndWritesANewIncompletePart(t *testing. Bucket: aws.String("bucket"), Key: aws.String("uploadId.part"), }).Return(&s3.HeadObjectOutput{ - ContentLength: 3, + ContentLength: aws.Int64(3), }, nil) s3obj.EXPECT().GetObject(context.Background(), &s3.GetObjectInput{ Bucket: aws.String("bucket"), Key: aws.String("uploadId.part"), }).Return(&s3.GetObjectOutput{ - ContentLength: 3, + ContentLength: aws.Int64(3), Body: io.NopCloser(bytes.NewReader([]byte("123"))), }, nil) s3obj.EXPECT().DeleteObject(context.Background(), &s3.DeleteObjectInput{ @@ -954,7 +954,7 @@ func TestWriteChunkPrependsIncompletePartAndWritesANewIncompletePart(t *testing. Bucket: aws.String("bucket"), Key: aws.String("uploadId"), UploadId: aws.String("multipartId"), - PartNumber: 1, + PartNumber: aws.Int32(1), Body: bytes.NewReader([]byte("1234")), })).Return(&s3.UploadPartOutput{ ETag: aws.String("etag-1"), @@ -996,13 +996,13 @@ func TestWriteChunkAllowTooSmallLast(t *testing.T) { }).Return(&s3.ListPartsOutput{ Parts: []types.Part{ { - PartNumber: 1, - Size: 400, + PartNumber: aws.Int32(1), + Size: aws.Int64(400), ETag: aws.String("etag-1"), }, { - PartNumber: 2, - Size: 90, + PartNumber: aws.Int32(2), + Size: aws.Int64(90), ETag: aws.String("etag-2"), }, }, @@ -1015,7 +1015,7 @@ func TestWriteChunkAllowTooSmallLast(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("uploadId"), UploadId: aws.String("multipartId"), - PartNumber: 3, + PartNumber: aws.Int32(3), Body: bytes.NewReader([]byte("1234567890")), })).Return(&s3.UploadPartOutput{ ETag: aws.String("etag-3"), @@ -1061,7 +1061,7 @@ func TestTerminate(t *testing.T) { Key: aws.String("uploadId.info"), }, }, - Quiet: true, + Quiet: aws.Bool(true), }, }).Return(&s3.DeleteObjectsOutput{}, nil) @@ -1102,7 +1102,7 @@ func TestTerminateWithErrors(t *testing.T) { Key: aws.String("uploadId.info"), }, }, - Quiet: true, + Quiet: aws.Bool(true), }, }).Return(&s3.DeleteObjectsOutput{ Errors: []types.Error{ @@ -1142,7 +1142,7 @@ func TestConcatUploadsUsingMultipart(t *testing.T) { Bucket: aws.String("bucket"), Key: aws.String("uploadId.info"), Body: bytes.NewReader([]byte(`{"ID":"uploadId+multipartId","Size":0,"SizeIsDeferred":false,"Offset":0,"MetaData":null,"IsPartial":false,"IsFinal":true,"PartialUploads":["aaa+AAA","bbb+BBB","ccc+CCC"],"Storage":{"Bucket":"bucket","Key":"uploadId","Type":"s3store"}}`)), - ContentLength: 234, + ContentLength: aws.Int64(234), }) // Calls from ConcatUploads @@ -1151,7 +1151,7 @@ func TestConcatUploadsUsingMultipart(t *testing.T) { Key: aws.String("uploadId"), UploadId: aws.String("multipartId"), CopySource: aws.String("bucket/aaa"), - PartNumber: 1, + PartNumber: aws.Int32(1), }).Return(&s3.UploadPartCopyOutput{ CopyPartResult: &types.CopyPartResult{ ETag: aws.String("etag-1"), @@ -1163,7 +1163,7 @@ func TestConcatUploadsUsingMultipart(t *testing.T) { Key: aws.String("uploadId"), UploadId: aws.String("multipartId"), CopySource: aws.String("bucket/bbb"), - PartNumber: 2, + PartNumber: aws.Int32(2), }).Return(&s3.UploadPartCopyOutput{ CopyPartResult: &types.CopyPartResult{ ETag: aws.String("etag-2"), @@ -1175,7 +1175,7 @@ func TestConcatUploadsUsingMultipart(t *testing.T) { Key: aws.String("uploadId"), UploadId: aws.String("multipartId"), CopySource: aws.String("bucket/ccc"), - PartNumber: 3, + PartNumber: aws.Int32(3), }).Return(&s3.UploadPartCopyOutput{ CopyPartResult: &types.CopyPartResult{ ETag: aws.String("etag-3"), @@ -1191,15 +1191,15 @@ func TestConcatUploadsUsingMultipart(t *testing.T) { Parts: []types.CompletedPart{ { ETag: aws.String("etag-1"), - PartNumber: 1, + PartNumber: aws.Int32(1), }, { ETag: aws.String("etag-2"), - PartNumber: 2, + PartNumber: aws.Int32(2), }, { ETag: aws.String("etag-3"), - PartNumber: 3, + PartNumber: aws.Int32(3), }, }, },